A simple tool for measuring durations in Python.
You can install stopuhr via pip:
pip install stopuhrHowever, uv is recommended for installing python packages:
uv add stopuhrWith stopuhr it is convinient to measure durations in Python:
import time
from stopuhr import stopwatch
with stopwatch("My Timer"):
# Do something
time.sleep(2)
>>> My Timer took 2.00s
@stopwatch("My Timer")
def my_function():
# Do something
time.sleep(2)
>>> My Timer took 2.00sThis library can much more than that. Visit the reference or example section for more details.