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

Uploaded Source

Built Distribution

python_deco-0.3.17-py3-none-any.whl (7.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: python-deco-0.3.17.tar.gz
  • Upload date:
  • Size: 5.8 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.17.tar.gz
Algorithm Hash digest
SHA256 03569f7fd8d4431bf480007e0b8e6aa0196546a09422b4a3ac72df1a9c61141e
MD5 b40f74e3f1a7f08b252122a6baa2667e
BLAKE2b-256 76c14b78b858e0dcb47d1698bdef2543532fd5c8dc8d16bed6e5700e78fa1918

See more details on using hashes here.

File details

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

File metadata

  • Download URL: python_deco-0.3.17-py3-none-any.whl
  • Upload date:
  • Size: 7.4 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.17-py3-none-any.whl
Algorithm Hash digest
SHA256 9d383c6dba1068c9a9d6c756ace29d302e83ae8d13ca8b3df26e39d41fe3bbeb
MD5 3301878274b14804f31471fc58795b85
BLAKE2b-256 9f541407d21c8622226072cc370e538d4acf9da038b837ae24ee70cb0fb343c6

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