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.1a2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9ff10bb536dc7e0878dbda719887ce6f9a859f07a5648a591e0c0309b45dacf6 |
|
MD5 | d9907721b9fe965b1f0d842057c4c6fd |
|
BLAKE2b-256 | 984e9f5b6876faa11807b5a2849d1b2d7890e350eb26ead3d2eab9e1343d6b80 |