Skip to main content

decorator toolkit library

Project description

DecTools provides a library of tools for creating Python decorators. It unifies usage between class decorators, decorators requiring arguments, and simple decorators. It also provides correct names, doc, and function signatures for decorated functions. Typical usage often looks like this:

@make_call_once
def register_callback(function):
      gui.callback_create(function.__name__, function)

@make_call_before
def require_login(function, args, kwargs, page_name):
     while not current_user_id():
        ...

@register
@require_login("Summary of Items")
def view_summary():
    ...

You can find manuals in docs/index.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

dectools-0.1.4.tar.gz (3.7 MB view details)

Uploaded Source

File details

Details for the file dectools-0.1.4.tar.gz.

File metadata

  • Download URL: dectools-0.1.4.tar.gz
  • Upload date:
  • Size: 3.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for dectools-0.1.4.tar.gz
Algorithm Hash digest
SHA256 ca47183111fa5b603c6a00c9de33a760ef6c91c0f9c8d94271b7a7299e3cd664
MD5 4db65a7faa58c75f10093ca4e9845bd0
BLAKE2b-256 09eed4c6448ac8a61b50120a54b0561a555adbe18668b1fb58001eee40e3065d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page