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

@timeie

from pyDeco.dev import inactive
from pyDeco.time import timeie

@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.12.tar.gz (5.0 kB view details)

Uploaded Source

Built Distribution

python_deco-0.3.12-py3-none-any.whl (6.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: python-deco-0.3.12.tar.gz
  • Upload date:
  • Size: 5.0 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.12.tar.gz
Algorithm Hash digest
SHA256 93ba3f38d8233dd0a675f7d4b46aeedf947a4166d18953d2e76d38eda1dd0081
MD5 419be1a51e0f151753b830ff671e9fd8
BLAKE2b-256 0c0f37a0f80749801674d87bb1c24ffeae3562e0a524d86b1b191ed59bff0839

See more details on using hashes here.

File details

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

File metadata

  • Download URL: python_deco-0.3.12-py3-none-any.whl
  • Upload date:
  • Size: 6.8 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.12-py3-none-any.whl
Algorithm Hash digest
SHA256 e9f4849998881a2a205922eec35bd55235ab7afd7da51914e49c2b9bebf5d3fc
MD5 4a3a8ee9eac880d2048988d2048eea69
BLAKE2b-256 97b94f11bc884508bbc85f6cdf16bf330bbc515cc2791fb69b59063b225127bb

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