A
A
Alexander2020-04-22 04:18:28
Python
Alexander, 2020-04-22 04:18:28

Is it correct to use sqlalchemy next to aiohttp?

Hello, I am writing a web application using aiohttp and asyncpg for database queries. In order not to create tables manually and change them when necessary, I use sqlalchemy + alembic next to it. Tell me if it's right to do this or there are better tools for managing the database than sqlalchemi + alembic.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dimonchik, 2020-04-22
@dimonchik2013

you will master Alchemy (for samples, of course) - you will be considered cool)
but Django ORM is simpler and more common
, there is still PeeWee for "quickly", but it is better as a makeweight, although they try to put Async on it , and then you can reach Pony ( show off in conjunction with all sorts of Falcons, if the customer has money and patience)

I have tried asyncpg and peewee-async.
In one of my recent projects, I have 2 components that intersect at the base. One is asynchronous, and the second is on Django.
I manage migrations through Django (and I consider its migrations the best among all), the models of the entire database, respectively, are also the first to be made in jang.
I made the second component on peewee-async, since model declarations from janga are transferred with minimal changes to peewee.
On “pure” asyncpg, I made a project in which a very large stream was written to the database and in SQL, because it was just more convenient in that project. There are no models as such, so it's not really an ORM.

from here

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question