Skip to main content

FuncAttr

Last release Python version Documentation Test status Test coverage Last commit

FuncAttr provides a simple decorator that assigns attributes to functions. For example, if you have several different functions for analyzing the same data, you might use this library to give each a descriptive title to be used in downstream plotting routines. Of course, it isn’t difficult to assign attributes like these to functions without a decorator, but such assignments must happen after the function body and can be easy to lose track of. A decorator puts these labels at the beginning of the function, and can never be accidentally separated from the function as the code is refactored.

Installation

FuncAttr is available on PyPI:

$ pip install funcattr

Usage

Here’s how to use the decorator:

from funcattr import annotate

@annotate(title="Do Spam")
def do_spam():
    pass

print(do_spam.title)  # Do Spam

Metadata

Release files for funcattr 0.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for funcattr 0.0.0
File Size Uploaded Provenance Actions
funcattr-0.0.0.tar.gz 4.3 kB Without provenance Details for funcattr-0.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for funcattr 0.0.0
File Interpreter ABI Platform Actions
funcattr-0.0.0-py2.py3-none-any.whl Python 3, Python 2 none any Details for funcattr-0.0.0-py2.py3-none-any.whl

Total release size: 7.0 kB

Release files / funcattr-0.0.0.tar.gz

Download URL funcattr-0.0.0.tar.gz
Size 4.3 kB
Tags Source
SHA-256 checksum
How to use checksums
e2d15716861702aadaddeecbc7bae85d67d9ea57928cc91e8432267dff551ff0
BLAKE2b-256 checksum
How to use checksums
323e5b02eeaca57b857c3d2b9566177f84a37bdd2539986a3e67ecbcfb34162a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.27.1

Release files / funcattr-0.0.0-py2.py3-none-any.whl

Download URL funcattr-0.0.0-py2.py3-none-any.whl
Size 2.8 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
fef770d80ebd208dfc14c273a337eae779ddc5aee89eb81a2a82be0d84744c50
BLAKE2b-256 checksum
How to use checksums
3ce50d2c74c93a707f8bd2e781f082db7db63caf36ee2d7da7e597c8f7a79980
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.27.1

Security for funcattr 0.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.0.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page