Skip to main content

Make your decorators glossy!

Project description


Installation

pip install glossy

Start Decorating

import glossy
import time


@glossy.decorator
def timer(func, *args, **kwargs):
    """
    Timer

    Place this decorator on functions to see how long
    they take to execute.
    """
    start = time.time()
    result = func(*args, **kwargs)
    secs = time.time() - start
    name = func.__name__
    print(f"Function {name} took {secs} seconds")
    return result

Features

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

glossy-0.0.3.tar.gz (5.3 kB view details)

Uploaded Source

Built Distribution

glossy-0.0.3-py2.py3-none-any.whl (7.9 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file glossy-0.0.3.tar.gz.

File metadata

  • Download URL: glossy-0.0.3.tar.gz
  • Upload date:
  • Size: 5.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/3.7.3

File hashes

Hashes for glossy-0.0.3.tar.gz
Algorithm Hash digest
SHA256 f2b7581354e42ab8bfc4c6dad1453eda342c6b412069e589f84077e32b143848
MD5 be547fece990529ab701e8a4131d5eb9
BLAKE2b-256 8f862e1443dc19ed941cb1af241760476c2de82932e4bce9fe994b1f6a49900c

See more details on using hashes here.

File details

Details for the file glossy-0.0.3-py2.py3-none-any.whl.

File metadata

  • Download URL: glossy-0.0.3-py2.py3-none-any.whl
  • Upload date:
  • Size: 7.9 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/3.7.3

File hashes

Hashes for glossy-0.0.3-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 09492fca57ba33093542f8ebec22815fa0662312bd23100c1c48465ee445dd8a
MD5 e20aba649002fe94bf773d5fe45adabe
BLAKE2b-256 e0bdfcdee24b5630e433ad435d7597cac09955437ec5030ca35f0418ca31917a

See more details on using hashes here.

Supported by

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