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)
Documentation
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.1a3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 84a66b2c9bb482396ae5ca9f39a5a64267210c00fb80c45af1499bda4be6041c |
|
MD5 | 5a04a7898e4b432e28e8f06402e10cbe |
|
BLAKE2b-256 | a603e8ff4d5555c7d976a987a5653e800f8ae4d0508c877548c38ac0e362a965 |