Skip to main content

Decorator to print how long each decorated function takes to complete.

Project description

timed-functions

Decorator to print how long each decorated function takes to complete.

How to use

from timed_functions import timing

@timing
def say_hello(name):
    print(f"Hello {name}")

Output:

Hello World
@timing - 'say_hello' function took 0.023 ms

How to deploy

python3 -m pip install --user --upgrade setuptools wheel
python3 -m pip install --user --upgrade twine

rm -rf build dist timed_functions.egg-info
python3 setup.py sdist bdist_wheel
python3 -m twine upload dist/*

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

timed-functions-1.0.0.tar.gz (1.7 kB view details)

Uploaded Source

Built Distribution

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

timed_functions-1.0.0-py3-none-any.whl (6.2 kB view details)

Uploaded Python 3

File details

Details for the file timed-functions-1.0.0.tar.gz.

File metadata

  • Download URL: timed-functions-1.0.0.tar.gz
  • Upload date:
  • Size: 1.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.2

File hashes

Hashes for timed-functions-1.0.0.tar.gz
Algorithm Hash digest
SHA256 441166e718f42d9af04019aaf7f4beab96b608fd7f24f8f990a6aef71bb86edf
MD5 729944cd36a2e4b634f351ef71b9b53d
BLAKE2b-256 05c71437d71fccf4847fd5fda6d7455c3a88e624d5c0d46fa4d0bb427e2c0427

See more details on using hashes here.

File details

Details for the file timed_functions-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: timed_functions-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 6.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.2

File hashes

Hashes for timed_functions-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2b986650dd57d2344adbeb7082c325cc579f45dd129d18e834209e59d64bc182
MD5 f1d9c6db211b36052da51cbd1c0d117b
BLAKE2b-256 12cc0b3e5b958f5a2c2ec8b08c47f9c8b768186174073b0423b6a667ced88637

See more details on using hashes here.

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