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.24.tar.gz (6.3 kB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

Details for the file python_deco-0.3.24.tar.gz.

File metadata

  • Download URL: python_deco-0.3.24.tar.gz
  • Upload date:
  • Size: 6.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.9

File hashes

Hashes for python_deco-0.3.24.tar.gz
Algorithm Hash digest
SHA256 a99e535a57199bc3861c60256bc54379534818f4ae38aeee76999446bb8df926
MD5 dc11b1d9d62f86d5288ec6e36b771f18
BLAKE2b-256 3885a29d0197e2d225b9b2b66899492060eabdd4c366ba2b4f27de357b06d123

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for python_deco-0.3.24-py3-none-any.whl
Algorithm Hash digest
SHA256 39995e83b983651b7addd13b62e9bae14162678f929d0b86613df68130dd4a2d
MD5 bbfb6e6ff3886d69c455ab427a513190
BLAKE2b-256 9151b4bc6c15bc6b2ed3e93972411c738b4b854031b0c3d9b23a2cfb130d1c16

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