Input with Timeout
input_with_timeout captures user input with a timeout. If the user does not
respond in time, it raises TimeoutError.
Installation
pip install input-with-timeout
or with uv:
uv add input-with-timeout
Features
- Customizable timeout for user input
- Cross-platform support (Windows and Unix)
- Typed public API (
py.typed) - Compatible with Python 3.8+
Usage
from input_with_timeout import input_with_timeout
try:
user_input = input_with_timeout("Enter your input: ", timeout=10)
print(f"Input received: '{user_input}'.")
except TimeoutError:
print("No input received within the timeout period.")
Use timeout=None for normal blocking input() behavior.
Contact
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file input_with_timeout-2.3.1.tar.gz.
File metadata
- Download URL: input_with_timeout-2.3.1.tar.gz
- Upload date:
- Size: 5.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
uv/0.12.3 {"installer":{"name":"uv","version":"0.12.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2f2c861c6cf39baf35e7be6b1c16a7067e1af989906e0e7988a76c4597fe30af
|
|
| MD5 |
dfc374ffef390a2e1326631852cab5bb
|
|
| BLAKE2b-256 |
d91b431eb22826d5f1eea33f347ef3510eb11e108bf131fbe25cfb1618691584
|
File details
Details for the file input_with_timeout-2.3.1-py3-none-any.whl.
File metadata
- Download URL: input_with_timeout-2.3.1-py3-none-any.whl
- Upload date:
- Size: 5.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
uv/0.12.3 {"installer":{"name":"uv","version":"0.12.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
40b404ef992506fddf88b29390c7970f71f67c3d244652988c97095867346cd6
|
|
| MD5 |
29438710b423d6604e31e4ce5ef71b54
|
|
| BLAKE2b-256 |
b421ee458b14eb82e3fe331ba4e6c1143034d975c8988ad5d684d0a778722bf1
|