async-timeout
Timeout context manager for asyncio programs
Decision gist · record as of 2026-08-14
No for new projects—use built-in alternatives in Python 3.11+. Yes-with-conditions for legacy codebases or projects supporting Python 3.8 that need timeout functionality and cannot upgrade. The package is abandoned and explicitly deprecated; install only if you cannot upgrade Python or need backward compatibility across versions.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.8 or later.
- Low install friction with no runtime dependencies.
- Repository is archived and maintenance status is abandoned; the package is explicitly deprecated in favor of built-in timeout functionality in newer Python versions.
License · maintenance · safety
Apache 2 (permissive) — Licensed under Apache 2 (permissive), allowing free use, modification, and distribution with minimal restrictions.
last release 2024-11-06 (646 days) · last repo commit 2026-05-18 · 571 stars · archived
0 known vulnerabilities (OSV.dev, 2026-08-14) · 162,671,640 downloads/mo, #254 on PyPI
Alternatives
Verify before relying
pip install async-timeout
from async_timeout import timeout
async with timeout(1.5):
await some_async_operation()- Whether version 5.0+ dual-mode compatibility fully covers all use cases of older versions without behavioral differences.
- Performance characteristics compared to alternatives in modern Python versions.
- Specific migration path and effort for projects currently using this package.
What it is and what it does
async-timeout is a context manager for applying timeout logic to asyncio code blocks. It wraps async operations and raises asyncio.TimeoutError if execution exceeds the specified delay. The package is now deprecated because Python 3.11+ includes equivalent built-in timeout functionality.
Version 5.0+ maintains backward compatibility by providing a dual-mode implementation that works identically on both older Python versions and Python 3.11+, allowing codebases to support both without conditional logic. The package exists primarily to ease migration and support projects that must run on mixed Python versions.
Use it for
- Apply timeout constraints to async operations in code that must support Python versions before 3.11.
- Migrate legacy codebases using conditional imports across Python versions.
- Cancel long-running async tasks with a deadline specified as absolute time.
- Check whether an async operation was cancelled by timeout using the expired property.
- Reschedule or disable timeouts mid-operation using available rescheduling methods.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
No for new projects—use built-in alternatives in Python 3.11+.
Yes-with-conditions for legacy codebases or projects supporting Python 3.8 that need timeout functionality and cannot upgrade. The package is abandoned and explicitly deprecated; install only if you cannot upgrade Python or need backward compatibility across versions.
Install
async-timeout on PyPI
Before you install
Low install friction with no runtime dependencies. Repository is archived and maintenance status is abandoned; the package is explicitly deprecated in favor of built-in timeout functionality in newer Python versions.
Requires Python 3.8 or later.
License in practice
Licensed under Apache 2 (permissive), allowing free use, modification, and distribution with minimal restrictions.
Quickstart
pip install async-timeout
from async_timeout import timeout
async with timeout(1.5):
await some_async_operation()
Verify before relying
- Whether version 5.0+ dual-mode compatibility fully covers all use cases of older versions without behavioral differences.
- Performance characteristics compared to alternatives in modern Python versions.
- Specific migration path and effort for projects currently using this package.
Package facts
| License | Apache 2 permissive |
| Python support | Supports the current Python release >=3.8 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | None |
| Maintenance | Abandoned 646 days since the last release |
| Last repo commit | repository archived |
| First released | |
| Downloads | 162,671,640 / month, #254 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/StableFramework :: AsyncIOIntended Audience :: DevelopersLicense :: OSI Approved :: Apache Software LicenseProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyTopic :: Software Development :: Libraries |
Evidence: async_timeout-5.0.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 › “asyncio timeout context manager”
- async-timeoutProvides an asyncio-compatible timeout context manager for applying…
- async-interruptProvides an asyncio context manager that interrupts a block of code…
- taskgroupBackports asyncio.TaskGroup, asyncio.Runner, and asyncio.timeout from…
Give your agent the search over MCP, or paste the wish link into any chat.
More Libraries packages
urllib3 is an HTTP client library that provides thread-safe connection pooling, SSL/TLS verification, multipart file uploads, request retries, compression support, and proxy handling for Python applications.
Requests is a Python HTTP library that simplifies sending HTTP/1.1 requests with automatic handling of headers, authentication, cookies, and response parsing.
Pluggy provides a plugin system that lets you define hook specifications and register implementations to be called in sequence, enabling extensible Python applications without tight coupling.
Install it if you're building an extensible application or framework.
Provides parsing, arithmetic, and recurrence rule computation for dates and times, with timezone support and iCalendar RFC compliance.
Install it if you need to parse flexible date strings, compute relative dates, handle timezones, or work with recurrence rules—it's the de facto choice for these tasks.
Six provides utility functions to write Python code that runs on both Python 2.7 and Python 3.3+, smoothing over language differences between the two versions.
pytest is a testing framework that lets you write test functions using plain assert statements and automatically discovers and runs them, with detailed failure reporting.
See also wait-for2 · async-interrupt · aiotools · stopit · interruptingcow · func-timeout · timeout-decorator · asyncio · aiojobs · iterators