Skip to main content

Democritus functions for working with timers.

Project description

Democritus Timer

PyPI CI Lint codecov The Democritus Project uses semver version 2.0.0 The Democritus Project uses ruff to format and lint code License: LGPL v3

Democritus functions[1] for working with timers.

[1] Democritus functions are simple, effective, modular, well-tested, and well-documented Python functions.

We use d8s (pronounced "dee-eights") as an abbreviation for democritus (you can read more about this here).

Installation

pip install d8s-timer

Usage

You import the library like:

from d8s_timer import *

Once imported, you can use any of the functions listed below.

Functions

  • def timer_start(name: str = None) -> str:
        """Start a timer with the given name. Timers can be stopped with the `timer_stop` function."""
    
  • def timer_get_time(name: str) -> float:
        """Get the current time for the timer with the given name."""
    
  • def timer_stop(name: str) -> float:
        """Stop a timer (you can start a timer with the `timer_start` function)."""
    
  • def time_it(func):
        """Return the time it takes func to execute."""
    

Development

👋  If you want to get involved in this project, we have some short, helpful guides below:

If you have any questions or there is anything we did not cover, please raise an issue and we'll be happy to help.

Credits

This package was created with Cookiecutter and Floyd Hightower's Python project template.

Project details


Download files

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

Source Distribution

d8s_timer-0.6.0.tar.gz (109.7 kB view details)

Uploaded Source

Built Distribution

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

d8s_timer-0.6.0-py3-none-any.whl (18.9 kB view details)

Uploaded Python 3

File details

Details for the file d8s_timer-0.6.0.tar.gz.

File metadata

  • Download URL: d8s_timer-0.6.0.tar.gz
  • Upload date:
  • Size: 109.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for d8s_timer-0.6.0.tar.gz
Algorithm Hash digest
SHA256 b5ede2849274edf1efd18271af9eb9acf631329a353d85e20158d71fc44559ec
MD5 d407d184e0023319f7af17a4af153baf
BLAKE2b-256 da9fad75200f69b927375109d1d0cd7db2efb4d7e5911b816e58314236fe9310

See more details on using hashes here.

Provenance

The following attestation bundles were made for d8s_timer-0.6.0.tar.gz:

Publisher: release-please.yml on democritus-project/d8s-timer

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file d8s_timer-0.6.0-py3-none-any.whl.

File metadata

  • Download URL: d8s_timer-0.6.0-py3-none-any.whl
  • Upload date:
  • Size: 18.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for d8s_timer-0.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0aee779c36248ac1fdb96b9123ede484aafd072675aac9f20ba135453f99c787
MD5 b7fbb2e91d3bf8ca68462d7b69e11634
BLAKE2b-256 9f64488d2dbc7d378f61844b51c7703bb80ede398b6d0ea607c03b059efe430b

See more details on using hashes here.

Provenance

The following attestation bundles were made for d8s_timer-0.6.0-py3-none-any.whl:

Publisher: release-please.yml on democritus-project/d8s-timer

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page