SQLAlchemy >= 1.4 support for aiohttp.
Project description
SQLAlchemy >= 1.4 support for aiohttp.
Install
pip install aiohttp-sqlalchemy
Example
from aiohttp import web
import aiohttp_sqlalchemy
from aiohttp_sqlalchemy import sa_engine, sa_middleware
routes = web.RouteTableDef()
@routes.get('/')
async def main(request):
async with request['sa_main'].begin():
# some code
app = web.Application(middlewares=[sa_middleware()])
aiohttp_sqlalchemy.setup(app, [sa_engine('sqlite+aiosqlite:///')])
app.add_routes(routes)
web.run_app(app)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for aiohttp_sqlalchemy-0.1a1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e198b285749fa4ba65a3ef2e1907c3abfe85a524ec2428081621e5a090973d4a |
|
MD5 | ecba5d1d9211d902bcf9056c4e24cd0b |
|
BLAKE2b-256 | f66d66208c1560a8e345b182c2dd06f4dd1ba389469fc333c7dd33b7644bb4e6 |