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

File metadata

File hashes

Hashes for fastapi_async_sql_profiler-0.1.3.14.tar.gz
Algorithm Hash digest
SHA256 d8b3e4f918cb40d5353f038f346c6e56d468993350e319cefd67e990d845b97b
MD5 ba5335b155398425ab7a95d44357c284
BLAKE2b-256 fda8013168e3d6a60ae7b57311dd481daeeb77762d1ce5cddcc74b40b939540e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fastapi_async_sql_profiler-0.1.3.14-py3-none-any.whl
Algorithm Hash digest
SHA256 23b39eef95a79886abf25e1bdb69164e40a4c7c74341369e437a0d780f985ecf
MD5 be87ce02e0f637b913bbf81de5d98e01
BLAKE2b-256 9163791b6e957bfe314e4356192664fbeda03c2a2ce65cd10589e3c107b9ffc5

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