fastapi async sqlalchemy profiler
Project description
fastapi-async-sql-profiler
- 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
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file fastapi_async_sql_profiler-0.1.3.15.tar.gz.
File metadata
- Download URL: fastapi_async_sql_profiler-0.1.3.15.tar.gz
- Upload date:
- Size: 108.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.11.2 Darwin/24.1.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
46deae9c5f092392dea254254b3078a62e30eddff7236fd282f0bb1dfca1b737
|
|
| MD5 |
7d768d1fe76ca2246ae64ffbe10ac7ca
|
|
| BLAKE2b-256 |
7a2a07203879290db0a94aea448e555661a5e57b2ada97923021b594882c3a8b
|
File details
Details for the file fastapi_async_sql_profiler-0.1.3.15-py3-none-any.whl.
File metadata
- Download URL: fastapi_async_sql_profiler-0.1.3.15-py3-none-any.whl
- Upload date:
- Size: 121.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.11.2 Darwin/24.1.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2d36257864626e2d27d62defbe0b2be8d599ba83b4636410030d338f041ef2e7
|
|
| MD5 |
f955e7f8c6488a6ad1909980a67541e4
|
|
| BLAKE2b-256 |
ea31850263c8fd4ed4baebb0b4148e3df020e67de0840397d0a5e216e93464c8
|