inputimeout
Multi platform standard input with timeout
What it is and what it does
inputimeout wraps standard input to add a timeout mechanism across Windows, macOS, and Linux. When you call inputimeout() with a prompt and timeout duration, it waits for user input up to that many seconds; if no input arrives, it raises TimeoutOccurred, which you catch to provide a fallback value or handle the timeout case. The package has no external runtime dependencies, making it lightweight to add to a project.
The package is in Beta status and has not been updated since 2018-03-02. It requires Python >=3.4. Because it is abandoned and unmaintained, it may not work correctly on newer Python versions or modern terminal environments, and any bugs or compatibility issues will not be fixed.
Use it for:
- Interactive CLI tools that need to proceed automatically if a user does not respond within a set time window.
- Automated testing scripts that prompt for optional input but should not hang indefinitely if stdin is not available.
- Batch processing workflows where a user confirmation prompt should time out and use a sensible default.
- Terminal applications that require responsive behavior even when input is slow or unavailable.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides cross-platform standard input with a timeout, allowing you to prompt for user input and automatically return a default or exception if no response arrives within a specified number of seconds.
No. The package is abandoned (last release 2018-03-02) with no maintenance signal, and while it has no known vulnerabilities and low install friction, its age and lack of updates create significant risk for modern Python environments. For new projects, consider a maintained alternative or implement timeout logic using threading or asyncio instead.
Install
inputimeout on PyPI
pip
pip install inputimeoutuv
uv add inputimeoutpoetry
poetry add inputimeoutInstalling inputimeout
Before you install
Installation is straightforward with no runtime dependencies, but the package has been abandoned since March 2018 with no active maintenance or updates.
License in practice
MIT license is permissive and places no restrictions on use, modification, or distribution in proprietary or open-source projects.
Quickstart
pip install inputimeout
from inputimeout import inputimeout, TimeoutOccurred
try:
something = inputimeout(prompt='>>', timeout=5)
except TimeoutOccurred:
something = 'default_value'
print(something)
Verify before relying
- Whether the package works reliably on Python versions beyond 3.6, given its age and lack of maintenance.
- Whether there are known issues with specific terminal emulators or operating systems not covered by original testing.
- Whether the timeout mechanism remains accurate on modern systems with different process scheduling.
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.4) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | abandoned — 3,087 days since the last release |
| First released | |
| Downloads | 16,909,239/month — #1,135 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: inputimeout-1.0.4-py3-none-any.whl
Tags
More Utilities packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
charset-normalizerDetects and normalizes text encoding from…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
PygmentsPygments is a syntax highlighter that colorizes…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
timeout-samplerPolls a function repeatedly within a timeout…
permissive · top 15,000 on PyPI
ptyprocessRun a subprocess in a pseudo terminal (pty) and…
permissive · top 1,000 on PyPI
ping3Ping3 sends ICMP echo requests to hosts and…
permissive · top 15,000 on PyPI
stopitProvides context managers and decorators to…
permissive · top 15,000 on PyPI
pwinputDisplays mask characters (like asterisks) as…
permissive · top 15,000 on PyPI
timeout-decoratorA decorator that enforces time limits on…
permissive · top 5,000 on PyPI
func-timeoutRuns any Python function with a specified…
copyleft · top 5,000 on PyPI
uptimeRetrieves the system uptime (time since last…
permissive · top 15,000 on PyPI
django-pgmigratePrevents migration downtime by detecting and…
permissive · top 5,000 on PyPI