fastapi-practices / fastapi_best_architecture

A RBAC (Role-Based Access Control) permission control system built on FastAPI, featuring a unique pseudo-three-tier architecture design, with built-in basic implementation of fastapi admin as a template library, free and open-source
https://fastapi-practices.github.io/fastapi_best_architecture_docs/
MIT License
657 stars 110 forks source link

✨ TODO #258

Open wu-clan opened 11 months ago

wu-clan commented 11 months ago

It would be great if you could provide PR.

We've fully upgraded to Pydantic-V2, but we still have some unfinished business from V1 that we'll continue to push in V2!

News:

downdawn commented 10 months ago

Fastapi Upgrade Starlette to >=0.29.0,<0.33.0 https://github.com/tiangolo/fastapi/releases/tag/0.108.0

Sqlmodel will support for Pydantic 2.0 https://github.com/tiangolo/sqlmodel/issues/654

wu-clan commented 10 months ago

I got an update push from fastapi but I'm watching https://github.com/encode/starlette/pulls and there are some amazing updates here, if they are merged Fastapi will need to continue to adapt Starlette-1.0.0, will these minor versions continue to be compatible? I'm not sure, but I don't want to consume time for minor versions.

downdawn commented 10 months ago

These projects share common developers, and we will continue to monitor them. Our existing project structure is already quite stable, with no significant issues for production. The current three-tier architecture appears to have room for further optimization, possibly by integrating SQLModel or other methods.

wu-clan commented 10 months ago

Our existing project structure is already quite stable, with no significant issues for production.

That's so cool, a solid architecture .

SQLModel is an ORM, we already have SQLA, what are your thoughts?

Repo: here

downdawn commented 10 months ago

SQLModel is both an SQLAlchemy model and a Pydantic model, so there is a possibility to further merge and simplify 'models' and 'schemas'.

We can keep an eye on this progress: Migration from SQLAlchemy to SQLModel. https://github.com/tiangolo/full-stack-fastapi-postgresql/issues/541

wu-clan commented 10 months ago

I agree with you, but I'll decline the offer.

Because SQLModel is not updated and fixed at a good pace and is missing documentation, in fact SQLModel was born here: https://github.com/tiangolo/pydantic-sqlalchemy to reduce manual schema definition and validation is great in my opinion;

Although the number of stars for SQLModel is promising, the number of users for it is much lower than for SQLA, and to use SQLModel, the users have to learn it as well,unless SQLModel is really all over the place, I'd migrate to it

downdawn commented 10 months ago

OK, I agree with you