Skip to main content

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

See: https://aiohttp-sqlalchemy.readthedocs.io/

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

aiohttp-sqlalchemy-0.1a3.tar.gz (3.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

aiohttp_sqlalchemy-0.1a3-py3-none-any.whl (3.3 kB view details)

Uploaded Python 3

File details

Details for the file aiohttp-sqlalchemy-0.1a3.tar.gz.

File metadata

  • Download URL: aiohttp-sqlalchemy-0.1a3.tar.gz
  • Upload date:
  • Size: 3.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.4 CPython/3.8.5 Linux/5.4.0-70-generic

File hashes

Hashes for aiohttp-sqlalchemy-0.1a3.tar.gz
Algorithm Hash digest
SHA256 dde38d1c0f77263dd6ca55493c833ceed039dbba9fa09f24d234c3487846a9fa
MD5 4d81e60ddf2e2cd039c6f48c4912d840
BLAKE2b-256 805f072335da0946d86e2b0265e3247214c8902372a00516947c5ebaa06213c4

See more details on using hashes here.

File details

Details for the file aiohttp_sqlalchemy-0.1a3-py3-none-any.whl.

File metadata

  • Download URL: aiohttp_sqlalchemy-0.1a3-py3-none-any.whl
  • Upload date:
  • Size: 3.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.4 CPython/3.8.5 Linux/5.4.0-70-generic

File hashes

Hashes for aiohttp_sqlalchemy-0.1a3-py3-none-any.whl
Algorithm Hash digest
SHA256 84a66b2c9bb482396ae5ca9f39a5a64267210c00fb80c45af1499bda4be6041c
MD5 5a04a7898e4b432e28e8f06402e10cbe
BLAKE2b-256 a603e8ff4d5555c7d976a987a5653e800f8ae4d0508c877548c38ac0e362a965

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page