threaded
Decorators for running functions in Thread/ThreadPool/IOLoop
Decision gist · record as of 2026-08-14
Yes, if you frequently write concurrent code and want to reduce boilerplate. The package is stable (Production/Stable classifier), has no dependencies, and works across modern Python versions. The aging maintenance status (last release 996 days ago) is not a blocker for a mature decorator library, but means you should not expect rapid bug fixes or new features. No known vulnerabilities.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.8 or later; asyncio integration requires an active event loop when using AsyncIOTask or ThreadPooled with loop_getter.
- Low install friction with no runtime dependencies.
- Maintenance is aging—last release was 996 days ago—but the repository remains active with a recent commit on 2026-01-12, suggesting occasional updates rather than abandonment.
License · maintenance · safety
Apache-2.0 (permissive) — Licensed under Apache-2.0 (permissive), allowing commercial and private use with minimal restrictions; suitable for most projects without license compatibility concerns.
last release 2023-11-22 (996 days) · last repo commit 2026-01-12 · 20 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 295,355 downloads/mo, #7,923 on PyPI
Alternatives
Verify before relying
pip install threaded
import threaded
@threaded.ThreadPooled
def blocking_task():
return "result"
future = blocking_task()
import concurrent.futures
concurrent.futures.wait([future])- Whether the package handles thread-local storage or context propagation correctly in all use cases
- Performance characteristics when managing large numbers of concurrent tasks relative to raw threading APIs
What it is and what it does
threaded is a decorator library that wraps ordinary Python functions to run them concurrently using standard library primitives—ThreadPoolExecutor, threading.Thread, or asyncio.Task. Instead of writing boilerplate like `loop.create_task()` or `thread_pool.submit()` every time you want to run a function concurrently, you decorate it once and call it normally; the decorator handles the concurrency setup and returns a future or thread object. It supports Python 3.8 through 3.12 on CPython and PyPy, with no external dependencies beyond the standard library.
The library provides three main decorators: ThreadPooled (submits to a thread pool with configurable worker count), Threaded (wraps in a threading.Thread with optional daemon and auto-start modes), and AsyncIOTask (wraps in an asyncio.Task). Each decorator can be configured with custom event loops or loop-extraction logic for integration with existing async code. The thread pool can be shut down explicitly during application shutdown.
Use it for
- Offload blocking I/O operations (file reads, network calls) to a thread pool without writing submit/future boilerplate
- Launch long-running background tasks as daemon threads with a single decorator instead of manual Thread instantiation
- Wrap synchronous functions to run as asyncio tasks within an event loop for mixed sync/async codebases
- Reduce copy-paste of concurrent.futures or threading setup code across a codebase by standardizing on decorators
- Integrate blocking library calls into async code by scheduling them on a thread pool executor
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you frequently write concurrent code and want to reduce boilerplate.
The package is stable (Production/Stable classifier), has no dependencies, and works across modern Python versions. The aging maintenance status (last release 996 days ago) is not a blocker for a mature decorator library, but means you should not expect rapid bug fixes or new features. No known vulnerabilities.
Install
threaded on PyPI
Before you install
Low install friction with no runtime dependencies. Maintenance is aging—last release was 996 days ago—but the repository remains active with a recent commit on 2026-01-12, suggesting occasional updates rather than abandonment.
Requires Python 3.8 or later; asyncio integration requires an active event loop when using AsyncIOTask or ThreadPooled with loop_getter.
License in practice
Licensed under Apache-2.0 (permissive), allowing commercial and private use with minimal restrictions; suitable for most projects without license compatibility concerns.
Quickstart
pip install threaded
import threaded
@threaded.ThreadPooled
def blocking_task():
return "result"
future = blocking_task()
import concurrent.futures
concurrent.futures.wait([future])
Verify before relying
- Whether the package handles thread-local storage or context propagation correctly in all use cases
- Performance characteristics when managing large numbers of concurrent tasks relative to raw threading APIs
Package facts
| License | Apache-2.0 permissive |
| Python support | Supports the current Python release >=3.8.0 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | None |
| Maintenance | Aging 996 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 295,355 / month, #7,923 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 :: Apache Software LicenseProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyTopic :: Software Development :: Libraries :: Python Modules |
Evidence: threaded-4.2.0-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 › “thread pool decorator”
- threadedProvides decorators to wrap functions for execution in thread pools,…
- PebblePebble provides decorators and pool abstractions to run functions in…
- unsyncDecorator-based library that runs async functions in an ambient event…
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 aioprocessing · unsync · kthread · pypeln · snapshot-restore-py · multitasking · Pebble · func-timeout · janus · requests-futures