Skip to main content

No project description provided

Project description

python Decoractor
Documentation Status

An OSS that has something to do with decorators in python

Features

  • Time related decorators
  • Debugging decorators
  • Custom cli input decorators

Example

@timeit

from pyDeco.dev import inactive
from pyDeco.time import timeit

@timeit
def func():
    # do something
    return 1
 pyDeco  | INFO | Function func() took 2.0261 seconds.

@stacktrace

from pyDeco.dev import stacktrace


def nested_func():
    print("nested")


def func_b():
    print("func_b")
    nested_func()


@stacktrace
def func_a():
    print("func_a")
    func_b()
    return 1


func_a()
 pyDeco  | INFO | @stacktrace set up for func_a()...
func_a
 pyDeco  | INFO |       Executing func_b, line 9, from /mnt/Personal/test.py
func_b
 pyDeco  | INFO |       Executing nested_func, line 5, from /mnt/Personal/test.py
nested

TODO

credits

https://bytepawn.com/python-decorators-for-data-scientists.html

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

python-deco-0.3.18.tar.gz (6.5 kB view details)

Uploaded Source

Built Distribution

python_deco-0.3.18-py3-none-any.whl (8.7 kB view details)

Uploaded Python 3

File details

Details for the file python-deco-0.3.18.tar.gz.

File metadata

  • Download URL: python-deco-0.3.18.tar.gz
  • Upload date:
  • Size: 6.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.2.1 CPython/3.10.4 Linux/5.15.0-60-generic

File hashes

Hashes for python-deco-0.3.18.tar.gz
Algorithm Hash digest
SHA256 3225b21f4f9861235a4d845ba98bee577fd49c1bd4b079237d47eb0bed68bb51
MD5 769ad60aa17ab8893baa26313311489b
BLAKE2b-256 140d763958e136b2e20fd35ca6c415b49e15264c72d79b009d48cd72cf06a8d7

See more details on using hashes here.

File details

Details for the file python_deco-0.3.18-py3-none-any.whl.

File metadata

  • Download URL: python_deco-0.3.18-py3-none-any.whl
  • Upload date:
  • Size: 8.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.2.1 CPython/3.10.4 Linux/5.15.0-60-generic

File hashes

Hashes for python_deco-0.3.18-py3-none-any.whl
Algorithm Hash digest
SHA256 7340a57252ad3b6a5a4fc540fa708f747833cbe05d08ea64de8c7ddc2dcf22a4
MD5 09805c022b02275c2efbdf28769d84be
BLAKE2b-256 8d1f57216e51af752e140ac37b69727eec02f9785c5c0c596816a5fe2894cf67

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