I have to say #sqlalchemy docs are painful. Very very difficult to find the right information. In contrast #sqlmodel docs are a pleasure to read! slqmodel is a thin layer to combine sqlalchemy and pydantic. Thus you need to lookup the touch stuff in the sqlalchemy docs.
Alguém aqui tb sente que a parte mais complexa ao se pensar um sistema, por mais simples que ele seja, é a modelagem de dados?? Surra dessas normalizações! #Python #PostgreSQL #SQLModel #fastAPI
#python #postgresql #sqlmodel #fastapi
New Pybites video is up:
Database migrations matter! Get up and running with Alembic + sqlmodel
https://youtu.be/gekC1ESLxPs
#python #databases #alembic #sqlmodel
Well I ventured into the land of #SQLModel and it went pretty well. I set up the entire database layout in a lot less code. Still have to figure out the rendering of data and doing the application bits but the foundation is there I think. Also need to beat the results into a form that works for me. Not entirely sure I like the class that describes the table being the same name as the row object. Creating a table class model for "Animal" will create a table named animal AND a row is a instance of the class "Animal". Traditionally I prefer plurals. A table may be "Animals" an instance of data (the row) would be an "Animal". But I can probably figure out a means to tweak that.