Socket
Book a DemoInstallSign in
Socket

decorit

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

decorit

Handy ready-to-use decorators.

0.2.0
pipPyPI
Maintainers
1

coverage report

decorit

The documentation including examples can be found here.

This is a package with handy ready-to-use decorators for daily scripting and maintaining packages. Decorator requests are highly appreciated, simply open an issue.

If you want to learn how to write your own decorators I recommand to head over to realpython and check out this article. In case you are looking for an wrapper to easily write decorators for your own, you might checkout pydecor.

This project is in an alpha stage, hence it is neither stable nor ready for production.

CAUTION: Starting from version 1.0.0 API-breaking changes will be made only in major releases. Until then, it can be changed in every minor release (see changelog).

Features

Existing decorators:

  • copy_doc: copy docstring of existing function
  • copy_doc_params: copy parameters of docstring of existing function
  • deprecated: print deprecated warning on call
  • alias: give multiple names to function, e.g. short and long
  • logging: logging call of functions
  • time: timeing execution of function
  • run_once: run function only once at first call

Usage

Installation

python3 -m pip install decorit

Usage

import decorit

# start decorating your functions

Building Documentation:

The doc is based on pdoc and can be created by simply running bash create_doc.sh from the docs folder. For dependencies see in the CI action.

Similar Projects

Credits:

In alphabetical order:

Keywords

decorators

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.