Skip to main content

fastapi async sqlalchemy profiler

Project description

fastapi-async-sql-profiler

  1. Add it to your file main.py
from fastapi_async_sql_profiler import SQLProfilerMiddleware
from fastapi_async_sql_profiler import router as profiler_router
from fastapi_async_sql_profiler import init_db


engine = create_async_engine("sqlite+aiosqlite:///db.sqlite")

app.include_router(profiler_router, prefix='', tags=['SQL Profiler'])
task = asyncio.create_task(init_db(engine_async=engine))

SQL_PROFILER_PASS_ROUTE_STARTSWITH = [
    '/docs',
    '/openapi.json',
    '/favicon.ico',
]
app.add_middleware(
    SQLProfilerMiddleware, engine=engine,
    skip_route_startswith=SQL_PROFILER_PASS_ROUTE_STARTSWITH,
)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fastapi_async_sql_profiler-0.1.3.13.tar.gz (108.0 kB view details)

Uploaded Source

Built Distribution

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

fastapi_async_sql_profiler-0.1.3.13-py3-none-any.whl (121.7 kB view details)

Uploaded Python 3

File details

Details for the file fastapi_async_sql_profiler-0.1.3.13.tar.gz.

File metadata

File hashes

Hashes for fastapi_async_sql_profiler-0.1.3.13.tar.gz
Algorithm Hash digest
SHA256 935d85d614587bfc066aba2628fd72c060fcb9fefb7288070c2a61ea005a2e36
MD5 089a46dc36d6bd0e3b041fb7be55f00c
BLAKE2b-256 de91b50174c856538044616893a709bf061e966ab73179862a768971574ebcfa

See more details on using hashes here.

File details

Details for the file fastapi_async_sql_profiler-0.1.3.13-py3-none-any.whl.

File metadata

File hashes

Hashes for fastapi_async_sql_profiler-0.1.3.13-py3-none-any.whl
Algorithm Hash digest
SHA256 1fa51befc3c0937b30bbf3fc01756000e3137828836cd42b03c76b68a3c2d575
MD5 e368706dbe9563fc980ecb5415a22bbc
BLAKE2b-256 17c747230500111cd15bd569c3caba244957d3a06a55d8ea482770fc1ba4057d

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