The future of ORMAR
Hello everyone, currently all my projects are working with ORMAR, but given so many updates I see that ORMAR is becoming very outdated, which is starting to cause some concern, as well as sadness about the time spent learning ORMAR instead of the infamous SQLALCHEMY.
I would like to know if this project will be continued, if it is better to swallow hard and migrate to SQLALCHEMY or even DJANGO now with its version 5.0.
pydantic has been in version 2 for a long time, so has sqlalchemy, I know a lot has changed, but we should already see some movement beyond the github bot updating the repository.
The worst thing for me was getting used to the way ORMAR works, now every ORM for me is strange and ugly.
@collerek
I realized now that it opens as a bug, I'm sorry
@molivramento I am working on support for pydantic v2, let's say 80% of functionality already works, but it's quite challenging as a lot of internals changed in pydantic, including some parts only in rust that are harder to modify from python side. Not sure how much longer it will take me, since there are some bugs in v2 too (i.e. bytes serialization in nested models as base64), not sure if pydantic will introduce plugins around serialization too that would simplifiy things.
If you want to move you should probably move to tiangolo's sqlmodel that has fastapi support.
Thank you for the response, I feel that this was what was bothering me the most. I became very attached to Ormar. When it visibly fell behind in maintenance/updates, I began searching for substitutes, like Django with django-ninja, Tortoise ORM, SQLAlchemy, and SQLModel. I decided to use SQLModel, but things that were very simple in Ormar like filters, relations, became a pain with SQLAlchemy. I will continue with SQLModel, but I really hope you can keep Ormar up to date. It simply combines the best of the two most important Python ORMs we have.
Is there something I/we can do to help with pydantic2 support?
@mekanix There is a WIP PR here: https://github.com/collerek/ormar/pull/1238
One of the open issues is updating the docs (i.e change all class Meta entries to ormar_config = ormar.OrmarConfig, choices params are not supported anymore (use Enum field instead), pydantic_only param is not supported anymore (just use pydantic fields normally).
Other open issue it to switch to lifecycle in docs, quickstart and tests for fastapi instead of events (on_startup, on_shutdown).
You can see the checklist in the pr. If youd ecide to take anything write in that pr (and branch from it). Your pr should contain only the feature you work at and be open against the WIP branch (and not master).
Glad to hear you want to help! :)
@collerek
Please, we need an urgent update at least temporary support to SQLAlchemy==1.4.52
I know you're working on SQLAlchemy 2 and Pydantic 2, but we need ORMAR to support SQLAlchemy 1.4.52 at least.
I am receiving: ormar 0.12.2 depends on SQLAlchemy<1.4.42 and >=1.3.18
Many external dependencies are waiting for this version and I'm stuck
You can try version 0.20.0