Как за один вечер я написал сервис инвентаризации оргтехники для филиальной сети из 16 локаций

Знакомая работает в IT-департаменте организации с 16 филиалами и ~5000 единиц оргтехники на балансе. Попросила: “Сделай сервис, чтобы загрузить фотку шильдика, и он сказал, у кого эта железка стоит”. Звучит просто. На практике это вылилось в production-сервис с распознаванием по фото через Claude vision, ETL из бухгалтерских .xls (привет, xlrd 1.2), нормализацией грязных инвентарных номеров и автопушем в Google Sheets. Рассказываю про все грабли — от deadlock pandas vs xlrd до бага, который считал две разные железки одной

https://habr.com/ru/articles/1039940/

#Python #FastAPI #SQLite #ETL #pandas #инвентаризация #Claude_vision #OpenRouter #SQLAlchemy

Как за один вечер я написал сервис инвентаризации оргтехники для филиальной сети из 16 локаций

История о том, как просьба «глянь, что у меня тут с табличками» превратилась в production-сервис с распознаванием по фото, защищённой авторизацией админкой и автопушем в Google Sheets. Со всеми...

Хабр

"Wait… SQLAlchemy Core Support?", I hear you ask. Yes, #DBXS supports #SQLAlchemy Core, and has done so for quite some time. This was previously undocumented so I can certainly forgive you for not knowing.

So the *real* story of this release is not so much any big code changes, but rather updated dependency testing as well as *comprehensive documentation* for the SQLAlchemy feature. This may teach you a few things you didn't know about #Python database support. https://dbxs.readthedocs.io/en/latest/howto.html#sqlalchemy-core-support

Getting Started with DBXS - DBXS documentation

I think #SQLAlchemy is a magnificent software project, worthy of great respect. But oh my god is it sapping my energy on a hobby project.

The biggest point of friction is that for various reasons, I want my domain objects to be driven by attrs plus cattrs. It's a combination I know well, and it lends itself perfectly to some of the things I'm doing.

But of course, the SQLAlchemy ORM wants to be the source of truth for my object graph. There being multiple layers at which you can do any given thing is also pretty exhausting.

I'm considering my alternatives. Do I keep SA but not use the ORM? Fall back to executing SQL statements directly via a lower-level, simpler library? Use a completely different type of datastore?

#python #programming

SQLAlchemy

SQLAlchemy is a popular Python-based object-relational mapper (ORM) that bridges database relations into objects.

Три архитектурных решения для multi-tenant B2B SaaS, о которых я пожалел, что не узнал раньше

Самая дорогая ошибка моего B2B SaaS имела ровно одну строчку Самая дорогая ошибка моего B2B SaaS имела ровно одну строчку: TENANT_ID = “tenant-1” в config.py . Полтора дня поиска бага показали, почему multi-tenant архитектуру нужно закладывать с первого коммита. Разбор трёх архитектурных решений для multi-tenant SaaS в регулируемой отрасли — tenant_id helper, PostgreSQL EXCLUDE USING gist против double-booking, 152-ФЗ как код на FastAPI и SQLAlchemy.

https://habr.com/ru/articles/1033488/

#multitenant #fastapi #postgresql #sqlalchemy #exclude_using_gist #argon2id #pbkdf2 #152фз #audit_log #b2b_saas

Три архитектурных решения для multi-tenant B2B SaaS, о которых я пожалел, что не узнал раньше

Самая дорогая ошибка моего B2B SaaS имела ровно одну строчку ```python # app/config.py TENANT_ID = "tenant-1" ``` Когда у меня был один тенант, всё работало корректно. На втором — половина...

Хабр

novo artigo: sua aplicação pode estar travando sob carga mesmo com queries rápidas e banco saudável.

o culpado quase sempre é o pool de conexões que ninguém configurou.

cobre pool_size, max_overflow, pool_recycle, pool_pre_ping, NullPool e PgBouncer — com critérios claros para cada escolha.

https://www.riverfount.dev.br/posts/connection-pooling-sqlalchemy/

#python #sqlalchemy #performance #produção

Por que a aplicação travava mesmo com queries rápidas

O profiling não encontrou nada. As queries estão com índice, rodam em menos de 5ms, e o cache eliminou as buscas repetidas. Mas sob carga — dez, vinte requisições simultâneas — a aplicação trava. Requisições acumulam na fila, o tempo de resposta explode, e o log mostra um erro que parece absurdo: TimeoutError: QueuePool limit of size 5 overflow 10 reached. O banco de dados não está sobrecarregado. As queries são rápidas. O problema está entre a aplicação e o banco — no pool de conexões que ninguém configurou.

Blog do Riverfount

I'm sure I'm doing something stupid, but I'm seeing SQLAlchemy+sqlite return a row that doesn't match the select condition. It is likely that SQLAlchemy is caching something, even though the session is fresh,

But the query is:
stmt = select(orm.Files).where(orm.Files.user == user and orm.Files.ontape == False).limit(1)

and it's returning:
Files(user='someuser', uuid='1b9f0805-6587-46ba-a44d-df0e2a1654bb', name='filename', size=3181952, ontape=True)

NEVER EVER should database software cache data at the start of a session. That's just wrong.

#Python #SQLAlchemy

Ich versacke im #python Universum. Nachdem ich einen Griff an #fastapi @FastAPI bekommen und @pydantic ein wenig verstanden habe, habe ich mir #sqlalchemy angesehen und mir ist am Donnerstag #typer über den Weg gelaufen. Auth kommt dann auch noch.
Mit einem eigenen Skill führt mich @claudeai Stück für Stück zu einer umfangreichen Anwendung

Developing a Robust CRUD Application with FastAPI and SQLAlchemy: A Comprehensive Tutorial

In 2026, the demand for high-performance, asynchronous web services continues to grow, making FastAPI the industry standard for Python-based backend development. This guide walks you through the essen...

📺 Watch here: https://www.youtube.com/watch?v=uGf2YTieHNw

##FastAPI ##SQLAlchemy ##Python ##WebDevelopment

⚡ 7. FastAPI Build a Complete CRUD App with SQLAlchemy (Full Step-by-Step Guide!)

In this video, we’re going to **build a complete CRUD application** using **FastAPI + SQLAlchemy ORM + SQLite** — from scratch! We’ll design a user manageme...

YouTube

📰 手動 ER 図メンテから卒業する── GitHub Actions × DBML 自動生成の実践 (👍 53)

🇬🇧 Auto-generate ER diagrams from SQLAlchemy models using GitHub Actions & DBML—never manually update docs again
🇰🇷 SQLAlchemy 모델에서 GitHub Actions로 DBML ER 다이어그램 자동 생성—수동 업데이트는 이제 그만

🔗 https://zenn.dev/finatext/articles/auto-generate-dbml-from-orm

#GitHubActions #SQLAlchemy #Zenn

手動 ER 図メンテから卒業する── GitHub Actions × DBML 自動生成の実践

Zenn