blockbuster
Utility to detect blocking calls in the async event loop
Decision gist · record as of 2026-08-14
Yes, if you write asyncio code and want to catch blocking calls during testing. The package is actively maintained, has low install friction, carries no known vulnerabilities, and solves a real problem in async development. The alpha status and single external dependency are minor considerations; the permissive license and broad Python version support make it straightforward to adopt in test suites.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires asyncio event loop to be running; only detects blocking calls within active async contexts.
- Works with CPython; other implementations require setattr monkey-patching support.
- Low install friction with a single runtime dependency (forbiddenfruit).
License · maintenance · safety
permissive license (permissive) — Licensed under Apache Software License (permissive), which allows commercial and private use with minimal restrictions.
last release 2025-12-05 (252 days) · last repo commit 2026-05-20 · 83 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 3,820,467 downloads/mo, #2,489 on PyPI
Alternatives
Verify before relying
pip install blockbuster
from blockbuster import BlockBuster
blockbuster = BlockBuster()
blockbuster.activate()
# Blocking calls within asyncio will now raise BlockingError- Whether forbiddenfruit dependency introduces any compatibility or maintenance concerns not evident from the fact sheet.
- Performance overhead of wrapping blocking functions during test execution.
- Coverage of blocking calls in C extensions from third-party libraries beyond the documented list.
What it is and what it does
Blockbuster is a testing utility that detects blocking calls within an asyncio event loop by wrapping common blocking functions from modules like time, os, socket, io, sqlite3, and threading. When a blocking operation is called from within an async context, it raises a BlockingError to alert developers. This helps identify performance bottlenecks and unpredictable behavior that can occur when blocking operations halt the entire event loop.
The package works by monkey-patching standard library functions and checking whether they are being invoked from within an asyncio event loop. It can be used manually by instantiating and activating a BlockBuster instance, as a context manager, or integrated into pytest test suites via fixtures. It supports customization through adding custom rules for third-party libraries and allowing blocking calls in specific contexts.
Use it for
- Integrate into pytest test suites to automatically catch blocking calls in async code during test execution.
- Verify that refactored legacy code no longer makes blocking calls when converted to async.
- Identify third-party library calls that inadvertently block the event loop during development.
- Validate that async APIs do not call blocking functions like time.sleep or file I/O operations.
- Catch blocking socket or database operations in async networking or data-access layers.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you write asyncio code and want to catch blocking calls during testing.
The package is actively maintained, has low install friction, carries no known vulnerabilities, and solves a real problem in async development. The alpha status and single external dependency are minor considerations; the permissive license and broad Python version support make it straightforward to adopt in test suites.
Install
blockbuster on PyPI
Before you install
Low install friction with a single runtime dependency (forbiddenfruit). Package is actively maintained with recent commits and marked as alpha-stage. Supports Python 3.8 through 3.13.
Requires asyncio event loop to be running; only detects blocking calls within active async contexts. Works with CPython; other implementations require setattr monkey-patching support.
License in practice
Licensed under Apache Software License (permissive), which allows commercial and private use with minimal restrictions.
Quickstart
pip install blockbuster
from blockbuster import BlockBuster
blockbuster = BlockBuster()
blockbuster.activate()
# Blocking calls within asyncio will now raise BlockingError
Verify before relying
- Whether forbiddenfruit dependency introduces any compatibility or maintenance concerns not evident from the fact sheet.
- Performance overhead of wrapping blocking functions during test execution.
- Coverage of blocking calls in C extensions from third-party libraries beyond the documented list.
Package facts
| License | permissive license permissive |
| Python support | Supports the current Python release >=3.8 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 1 packageforbiddenfruit |
| Maintenance | Actively maintained 252 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 3,820,467 / month, #2,489 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 3 - AlphaIntended Audience :: DevelopersLicense :: OSI Approved :: Apache Software LicenseProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Software Development :: Build Tools |
Evidence: blockbuster-1.5.26-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “detect blocking calls asyncio”
- blockbusterBlockbuster detects and prevents blocking calls within an asyncio…
- aiocopDetects and logs blocking I/O and CPU calls in asyncio code using…
- pyleakDetects leaked asyncio tasks, threads, and event loop blocking in…
Give your agent the search over MCP, or paste the wish link into any chat.
More Build Tools packages
Provides reusable utilities for Python packaging interoperability, including version handling, specifiers, markers, requirements, tags, and metadata parsing according to standards like PEP 440 and PEP 425.
Wraps any iterable to display a real-time progress bar in the terminal or Jupyter notebook, showing iteration count, elapsed time, and estimated time remaining.
pip is the standard installer for Python packages, enabling you to download and install packages from the Python Package Index and other indexes into your Python environment.
Hatchling is a standards-compliant Python build backend that handles packaging, metadata, and distribution of Python projects when configured in a project's pyproject.toml file.
Generates Python gRPC service stubs and message classes from Protocol Buffer definitions, enabling developers to build gRPC clients and servers.
pre-commit is a framework for installing and running git hooks written in any language before commits are made, automating code quality and validation checks across multi-language projects.
Install it if your team needs consistent, automated validation at commit time.
See also aiocop · aioshutil · aioprocessing · pyleak · aiofiles · asynctest · asyncer · asyncclick · synchronicity · pyserial-asyncio