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.15.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.15-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.15.tar.gz.

File metadata

File hashes

Hashes for fastapi_async_sql_profiler-0.1.3.15.tar.gz
Algorithm Hash digest
SHA256 46deae9c5f092392dea254254b3078a62e30eddff7236fd282f0bb1dfca1b737
MD5 7d768d1fe76ca2246ae64ffbe10ac7ca
BLAKE2b-256 7a2a07203879290db0a94aea448e555661a5e57b2ada97923021b594882c3a8b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fastapi_async_sql_profiler-0.1.3.15-py3-none-any.whl
Algorithm Hash digest
SHA256 2d36257864626e2d27d62defbe0b2be8d599ba83b4636410030d338f041ef2e7
MD5 f955e7f8c6488a6ad1909980a67541e4
BLAKE2b-256 ea31850263c8fd4ed4baebb0b4148e3df020e67de0840397d0a5e216e93464c8

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