taskgroup
backport of asyncio.TaskGroup, asyncio.Runner and asyncio.timeout
Decision gist · record as of 2026-08-14
Yes, if you need TaskGroup or timeout on Python versions prior to 3.12. The package is lightweight, permissively licensed, actively maintained, has no known vulnerabilities, and solves a real compatibility gap. Use conditional imports to avoid redundancy on Python 3.12+.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.8 or later; asyncio event loop must be available.
- Low install friction; pure Python wheel with only two lightweight runtime dependencies (exceptiongroup and typing_extensions).
- Repository is active with a recent release (2025-01-03) and no archived status.
License · maintenance · safety
permissive license (permissive) — MIT license (permissive); you can use this in commercial and proprietary projects with minimal restrictions, provided you include the license notice.
last release 2025-01-03 (588 days) · last repo commit 2026-08-10 · 10 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 2,771,696 downloads/mo, #2,895 on PyPI
Alternatives
Verify before relying
from taskgroup import TaskGroup, timeout, run
async def main():
async with TaskGroup() as group:
group.create_task(some_coroutine())
run(main())- Whether the backport maintains full API and behavior parity with Python 3.12.8 TaskGroup in edge cases.
- Performance characteristics compared to native asyncio.TaskGroup in Python 3.12+.
- Whether uncancel and context-setting behavior is fully compatible with all asyncio patterns.
- Exact Python version support range (description mentions 3.8–3.11 but requires_python is unspecified).
What it is and what it does
TaskGroup is a backport of Python 3.12.8's structured concurrency primitives to older Python versions. It provides TaskGroup (for managing groups of concurrent tasks with unified exception handling), Runner (a context manager for running async code), and timeout (for enforcing time limits on async operations). The implementation works by temporarily replacing the current asyncio.Task with a subclass that adds uncancel and context-setting support, allowing most of asyncio's C-accelerated behavior to remain intact.
This package is useful when you want to write modern async code using Python 3.12's concurrency patterns but need to support older Python environments. It depends on exceptiongroup and typing_extensions to bridge compatibility gaps.
Use it for
- Write async code using TaskGroup syntax on older Python versions without waiting for a platform upgrade.
- Manage multiple concurrent tasks with automatic exception aggregation and cleanup across Python versions.
- Add timeout enforcement to async operations on Python versions that lack native asyncio.timeout.
- Migrate legacy async codebases to structured concurrency patterns while maintaining backward compatibility.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you need TaskGroup or timeout on Python versions prior to 3.12.
The package is lightweight, permissively licensed, actively maintained, has no known vulnerabilities, and solves a real compatibility gap. Use conditional imports to avoid redundancy on Python 3.12+.
Install
taskgroup on PyPI
Before you install
Low install friction; pure Python wheel with only two lightweight runtime dependencies (exceptiongroup and typing_extensions). Repository is active with a recent release (2025-01-03) and no archived status.
Requires Python 3.8 or later; asyncio event loop must be available.
License in practice
MIT license (permissive); you can use this in commercial and proprietary projects with minimal restrictions, provided you include the license notice.
Quickstart
from taskgroup import TaskGroup, timeout, run
async def main():
async with TaskGroup() as group:
group.create_task(some_coroutine())
run(main())
Verify before relying
- Whether the backport maintains full API and behavior parity with Python 3.12.8 TaskGroup in edge cases.
- Performance characteristics compared to native asyncio.TaskGroup in Python 3.12+.
- Whether uncancel and context-setting behavior is fully compatible with all asyncio patterns.
- Exact Python version support range (description mentions 3.8–3.11 but requires_python is unspecified).
Package facts
| License | permissive license permissive |
| Python support | Not specified |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 2 packagesexceptiongrouptyping_extensions |
| Maintenance | Actively maintained 588 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 2,771,696 / month, #2,895 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | License :: OSI Approved :: MIT License |
Evidence: taskgroup-0.2.2-py2.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 › “asyncio taskgroup backport”
- taskgroupBackports asyncio.TaskGroup, asyncio.Runner, and asyncio.timeout from…
- aiotoolsaiotools provides idiomatic asyncio utilities for structured…
- asyncioThis package is an obsolete backport of Python's asyncio module and…
Give your agent the search over MCP, or paste the wish link into any chat.
More Software Development packages
Provides backported and experimental type hints for Python 3.9+, allowing use of newer typing features on older Python versions and enabling early experimentation with type system PEPs before they enter the standard library.
NumPy provides an N-dimensional array object and a comprehensive suite of mathematical, linear algebra, Fourier transform, and random number functions for scientific computing in Python.
FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.
Provides a way to document function parameters, class attributes, return types, and variables inline using Python's `Annotated` type hint syntax instead of traditional docstrings.
Typer builds command-line applications from Python functions using type hints, automatically generating help text, argument parsing, and shell completion.
Install it if you are building CLIs in Python.
Distlib provides low-level packaging utilities for building, distributing, and managing Python software—including metadata handling, version specifiers, wheel support, script installation, and dependency resolution.
See also backports.asyncio.runner · subprocess32 · aiocontextvars · aiotools · async-interrupt · asyncio · threaded · backports.tempfile · futures · contextlib2