Lunrtick
Joined 6 years ago
Joined 6 years ago
It seems quite unfair to place the blame on SQLAlchemy here, or even Python.
Even a statically typed language wouldn't prevent this kind of issue - the author of the code is the only person who can decide when they mean "use this exact string each time" or "use this function to give me a new string each time".
I suppose a column description API could follow the dataclass style definition, with different argument names for default and default_func. That would (I think) prevent this from happening.
It uses jdbc drivers for database support, so it can handle basically anything.
For websockets or lots of network calls, you can't really beat async though.
[1] https://techspot.zzzeek.org/2015/02/15/asynchronous-python-a...
It's most of FastAPI (auto docs generation, great Pydantic integration, etc) but for Django.
The web side of it seems rather different from a Flask or FastAPI setup, and it obviously doesn't have SQLAlchemy (which I really like). Do you have any recommendations on that front?
What libraries are you using? I haven't found anything that seems to match the easy OpenAPI schema generation and validation that FastAPI and Pydantic provide.