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

Uploaded Source

Built Distribution

python_deco-0.3.14-py3-none-any.whl (6.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: python-deco-0.3.14.tar.gz
  • Upload date:
  • Size: 5.3 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.14.tar.gz
Algorithm Hash digest
SHA256 aeeb252cca87033e20c11df29033d48a1e000035f5f5d3da211a0255fbbe3d6f
MD5 19de669c09d14800073048943fa72d1d
BLAKE2b-256 423020f121e106959699df2bf54bf7b353b4216113c0a525379e8cd7bcb6b88b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: python_deco-0.3.14-py3-none-any.whl
  • Upload date:
  • Size: 6.9 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.14-py3-none-any.whl
Algorithm Hash digest
SHA256 c3b572d42be35a7c674ce96813389884d5d1af5df53246d47c6a2cabf121c831
MD5 8618b5fb280fa6ca80bf766da31a2549
BLAKE2b-256 2c9323544d22c794266b8b75fe5f4f03d40a41c04b0c6bd1afe48e8816d6d403

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