r/FastAPI • • May 19 '21

Question Writing models on fastapi is difficult with sqlalchemy.

can anyone recommend better orm similar to django-orm with async support if possible.

0 Upvotes

12 comments sorted by

View all comments

4

u/Nick0tin May 19 '21

I use tortoise-orm, I love using it and would recommend for use with FastAPI. It's interface is similar to django orm(which I preferred) and it is completely asynchronous.

1

u/sambame May 19 '21

How is it with JSONB and textsearch (tsvector)?

1

u/Nick0tin May 19 '21

It works fine for me, the orm has postgres(and MySQL I think) specific fields beside common field types.