PSW - Python Stop Watch
psw is a lightweight, intuitive Command Line Interface (CLI) stopwatch and timer utility written in Python. It features live console rendering, interactive real-time controls, and built-in repeat functionalities without requiring any complex external audio dependencies.
Install
You can install psw via pip:
pip install psw
Usage
1. Stopwatch Mode
Measure elapsed time directly in your terminal.
Start the Stopwatch
To start the stopwatch, run:
psw start
The live clock will be displayed in the console:
00 h 00 m 00.000 s
Options
-p, --precision: Specifies the number of decimal places for seconds.- Default:
3(millisecond precision) - Example:
psw start -p 2will display00 h 00 m 00.00 s
Interactive Controls (While Running)
While the stopwatch is active, you can control it in real-time using the following keys:
s: Pause / Resume the stopwatch.l: Record a lap time. The current lap time will be printed below the running clock without stopping the main timer.q(orCtrl+C): Quit the stopwatch and display the final summary.
2. Timer Mode
Count down from a specified duration with advanced repeat and notification options.
Start the Timer
To start a countdown, use the timer command followed by the duration. You can specify hours (h), minutes (m), and seconds (s).
# Set a timer for 5 minutes and 30 seconds
psw timer 5m 30s
# Set a timer for 1 hour
psw timer 1h
The countdown will be displayed in the console:
00 h 05 m 30.000 s
Options
-p, --precision: Same as the stopwatch mode, specifies the decimal places for seconds (Default:3).-r, --repeat [<integer>]: Restarts the timer when it reaches zero.- Use without arguments for an infinite loop.
- Example:
psw timer 1m -r
- Example:
- Specify an integer to repeat a specific number of times.
- Example:
psw timer 1m -r 3(Runs a 1-minute timer 3 times)
- Example:
- Use without arguments for an infinite loop.
-m, --mute: Disables the system alert sound (terminal bell) when the timer ends.
Interactive Controls (While Running)
s: Pause / Resume the countdown.q(orCtrl+C): Cancel and exit the timer.
Metadata
Release files for psw 0.1.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| psw-0.1.4.tar.gz | 10.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| psw-0.1.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 20.4 kB
Release files / psw-0.1.4.tar.gz
| Download URL | psw-0.1.4.tar.gz |
|---|---|
| Size | 10.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5999da0cfb75331daecd2c55f4b76f38b16090da14bcb82bdcf451fd25028329
|
|
BLAKE2b-256 checksum How to use checksums |
aa1ce667ff0ad55256d1719571343fc3250d0c55292ed83881eaa14ed7b39c6c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 15, 2026.
Transparency logRelease files / psw-0.1.4-py3-none-any.whl
| Download URL | psw-0.1.4-py3-none-any.whl |
|---|---|
| Size | 10.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b2cba7321756fd77560973c65681db8a62898ab7fc037ea03e748bb006c31be5
|
|
BLAKE2b-256 checksum How to use checksums |
326fa58b0cb8f5031d060198bfb253a639a4a1edf89b6e8d9fa6129b3f2ec979
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 15, 2026.
Transparency log