Event loop lock detector for Python.
Installation
pip install gadasyncblock
Usage
import contextlib
from fastapi import FastAPI
from gadasyncblock import AsyncBlock
# logger: asyncio.detector
detector = AsyncBlock(timeout=1)
@contextlib.asynccontextmanager
async def lifespan(_: FastAPI):
detector.start()
yield
detector.shutdown()
app = FastAPI(lifespan=lifespan)
@app.post("/run")
async def run():
time.sleep(2)
return {"message": "Blocked"}
Metadata
Release files for gadasyncblock 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| gadasyncblock-0.0.2.tar.gz | 2.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| gadasyncblock-0.0.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 5.9 kB
Release files / gadasyncblock-0.0.2.tar.gz
| Download URL | gadasyncblock-0.0.2.tar.gz |
|---|---|
| Size | 2.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d1b6b0c4de54dcb0df3be0c0564cb0c3987cd4872f8e8f96039b1850cd0744d8
|
|
BLAKE2b-256 checksum How to use checksums |
f846d38e640bf613846356bb9e3272442b0b3a85ddb4d8d3db8657ecd28460fe
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.12.3
|
Release files / gadasyncblock-0.0.2-py3-none-any.whl
| Download URL | gadasyncblock-0.0.2-py3-none-any.whl |
|---|---|
| Size | 3.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7767eae5f3e33ca058b96a25b1018b7e675053b0d77e2802bb34f63f62ea1fc3
|
|
BLAKE2b-256 checksum How to use checksums |
bbdc2c5a7d10081adac26be6cae5c834d5e007bf1b81fb8ea2b3473c5202d466
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.12.3
|