Skip to main content

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

https://t.me/mamahoos

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

input_with_timeout-2.3.1.tar.gz (5.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

input_with_timeout-2.3.1-py3-none-any.whl (5.4 kB view details)

Uploaded Python 3

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

Hashes for input_with_timeout-2.3.1.tar.gz
Algorithm Hash digest
SHA256 2f2c861c6cf39baf35e7be6b1c16a7067e1af989906e0e7988a76c4597fe30af
MD5 dfc374ffef390a2e1326631852cab5bb
BLAKE2b-256 d91b431eb22826d5f1eea33f347ef3510eb11e108bf131fbe25cfb1618691584

See more details on using hashes here.

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

Hashes for input_with_timeout-2.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 40b404ef992506fddf88b29390c7970f71f67c3d244652988c97095867346cd6
MD5 29438710b423d6604e31e4ce5ef71b54
BLAKE2b-256 b421ee458b14eb82e3fe331ba4e6c1143034d975c8988ad5d684d0a778722bf1

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

2.3.1 This release

2 files

2.3.0

2 files

2.2

2 files

2.1

1 file

2.0

1 file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page