Skip to main content

logo

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)

Source distribution for gadasyncblock 0.0.2
File Size Uploaded
gadasyncblock-0.0.2.tar.gz 2.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for gadasyncblock 0.0.2
File Interpreter ABI Platform
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

Release history Release notifications | RSS feed

This release

0.0.2 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page