There is relatively new Python 3 aiohttp library that contains client/server. Does it contain ORM? If not - is it possible to use it with 3-rd party ORM? If not possible - for which purpose it could be used? I don't mean that app could not be written without ORM, but major waste of Python Frameworks support it and developers are used to such style of programming.
Asked
Active
Viewed 7,080 times
2 Answers
9
Short answer -- aiohttp has no ORM yet.
You can use SQLAlchemy-like queries for aiopg driver, see example
The same is available for aiomysql.
The support is not full-fledged Object-Relational Mapping but only helpers for making SQL queries easier.

Andrew Svetlov
- 16,730
- 8
- 66
- 69
-
1@AndrewSvetlow Thanks for answer. Are there some plans to include ORM into aiohttp in the future? – wolendranh Sep 15 '15 at 07:01
-
1@AndrewSvetlov / @wolendranh Would you discourage then, for some reason, to give all data manipulation instructions to the SQLAlchemy ORM, ask it to generate the SQL for the given instructions, and then executing that SQL in the normal way (`connection.execute(query)`)? Being able to use SQLAlchemy's ORM layer is a great advantage... – Sander Vanden Hautte Feb 19 '18 at 15:59
6
Update in 2018: there is GINO now, built on top of SQLAlchemy core and asyncpg for asyncio.

Fantix King
- 1,414
- 1
- 14
- 13