Pebble
Threading and multiprocessing eye-candy.
Decision gist · record as of 2026-08-14
Yes. Pebble is actively maintained, has no external dependencies, carries a copyleft license suitable for open-source work, and provides genuine convenience for concurrent programming. Install it if you need decorator-based thread or process management with timeout support; skip it if you need only basic threading or if your project cannot accept LGPL licensing.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.8 or later.
- Low friction installation with no runtime dependencies.
- Actively maintained with recent releases and a stable codebase since 2013.
License · maintenance · safety
LGPL (copyleft) — Licensed under LGPL (copyleft), which requires derivative works to be distributed under compatible terms; suitable for open-source projects but review is needed before use in proprietary software.
last release 2026-07-19 (26 days) · last repo commit 2026-08-07 · 651 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 1,546,487 downloads/mo, #3,778 on PyPI
Alternatives
Verify before relying
pip install Pebble
from pebble import concurrent
from concurrent.futures import TimeoutError
@concurrent.process(timeout=10)
def function(foo, bar=0):
return foo + bar
future = function(1, bar=2)
try:
result = future.result()
except TimeoutError:
print("Timed out")- Whether process-based execution works reliably on Windows (multiprocessing platform differences not detailed in fact sheet).
- Performance characteristics and overhead compared to direct threading/multiprocessing for specific workload types.
What it is and what it does
Pebble is a decorator-based library that simplifies running functions concurrently in threads or separate processes. It wraps Python's threading and multiprocessing modules with a cleaner API, allowing you to mark functions with @concurrent.thread or @concurrent.process and get back futures that you can poll or await. The library handles timeouts, error propagation (including remote tracebacks from worker processes), and provides pool abstractions for managing multiple workers with configurable restart and task limits.
The package is useful when you need to offload blocking I/O or CPU-bound work without writing boilerplate around futures and exception handling. It supports both synchronous and asyncio-based code paths, so you can use the same decorated functions in traditional or async contexts. With no external dependencies and support for current Python versions, it's straightforward to add to existing projects.
Use it for
- Offload blocking I/O operations (file reads, network calls) to threads while keeping the main thread responsive.
- Run CPU-bound computations in separate processes to avoid Python's GIL and parallelize work.
- Enforce time limits on long-running tasks and handle timeouts gracefully without killing the process.
- Build worker pools for batch processing with automatic task distribution and error collection.
- Integrate concurrent execution into asyncio applications using the @asynchronous decorators.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
Pebble is actively maintained, has no external dependencies, carries a copyleft license suitable for open-source work, and provides genuine convenience for concurrent programming. Install it if you need decorator-based thread or process management with timeout support; skip it if you need only basic threading or if your project cannot accept LGPL licensing.
Install
pebble on PyPI
Before you install
Low friction installation with no runtime dependencies. Actively maintained with recent releases and a stable codebase since 2013.
Requires Python 3.8 or later.
License in practice
Licensed under LGPL (copyleft), which requires derivative works to be distributed under compatible terms; suitable for open-source projects but review is needed before use in proprietary software.
Quickstart
pip install Pebble
from pebble import concurrent
from concurrent.futures import TimeoutError
@concurrent.process(timeout=10)
def function(foo, bar=0):
return foo + bar
future = function(1, bar=2)
try:
result = future.result()
except TimeoutError:
print("Timed out")
Verify before relying
- Whether process-based execution works reliably on Windows (multiprocessing platform differences not detailed in fact sheet).
- Performance characteristics and overhead compared to direct threading/multiprocessing for specific workload types.
Package facts
| License | LGPL copyleft |
| Python support | Supports the current Python release >=3.8 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | None |
| Maintenance | Actively maintained 26 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 1,546,487 / month, #3,778 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)Operating System :: OS IndependentProgramming Language :: Python :: 3Topic :: Software Development :: Libraries :: Python Modules |
Evidence: pebble-5.2.1-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 › “timeout handling threads”
- PebblePebble provides decorators and pool abstractions to run functions in…
- stopitProvides context managers and decorators to enforce timeouts on code…
- func-timeoutRuns any Python function with a specified timeout limit, raising an…
Give your agent the search over MCP, or paste the wish link into any chat.
More Python Modules packages
Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.
Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.
Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.
PyYAML parses and emits YAML 1.1 data format, enabling serialization and deserialization of configuration files and Python objects to and from human-readable YAML text.
Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.
Provides reusable metadata objects for use with PEP-593 `typing.Annotated` to express common constraints like bounds, collection sizes, and predicates on types.
Install it if you use or build libraries that need to express type constraints in a standardized, inspectable way—or if you want to annotate your own types with…
Provides runtime tools to inspect and introspect Python type annotations, enabling programmatic examination of type hints at execution time.
See also multitasking · bounded-pool-executor · parallelbar · stopit · threaded · Flask-Threads · Flask-Executor · unsync · mpire · timeout-decorator