attrcheck: attribution checker
This module provides a simple attribution checker implemented as a decorator. All functionality are provided as keyword arguments of the decorator.
Sample example of usage is following:
>>> from attrcheck import attrcheck >>> @attrcheck(x=['real'], y=['index', 'strip'], z=dir(list)) ... def foo(x, y, z=[]): passThe code above means the following:
>>> def foo(x, y, z=[]): ... if not hasattr(x, 'real'): ... raise AttributeError ... if not hasattr(y, 'index'): ... raise AttributeError ... if not hasattr(y, 'strip'): ... raise AttributeError ... for name in dir(list): ... if not hasattr(z, name): ... raise AttributeErrorIn addition, attrcheck can check default argument values. Thus, the following code throws AttributeError.
>>> @attrcheck(y=dir(str)) ... def bar(x, y=[]): pass
Metadata
Release files for attrcheck 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| attrcheck-0.1.2.tar.gz | 2.4 kB | Without provenance | Details for attrcheck-0.1.2.tar.gz |
Built distributions (wheels)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| attrcheck-0.1.2-py3.2.egg | Legacy Egg format | - | - | Details for attrcheck-0.1.2-py3.2.egg |
| attrcheck-0.1.2-py2.7.egg | Legacy Egg format | - | - | Details for attrcheck-0.1.2-py2.7.egg |
Total release size: 14.0 kB
Release files / attrcheck-0.1.2.tar.gz
| Download URL | attrcheck-0.1.2.tar.gz |
|---|---|
| Size | 2.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2a18d733ecf7def34fbc3e0066ccdf7b996ed54c5213e19788c73ac0075e72ab
|
|
BLAKE2b-256 checksum How to use checksums |
1bef5a2aecc3573a6029ee6437e0506ac73ba7b94a8dc986b2f15b62977138c7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / attrcheck-0.1.2-py3.2.egg
| Download URL | attrcheck-0.1.2-py3.2.egg |
|---|---|
| Size | 5.8 kB |
| Tags | Egg |
|
SHA-256 checksum How to use checksums |
c9a63ed68b24324973909aaa209e35ffa452c6547d5a036b761fb1960ac31be6
|
|
BLAKE2b-256 checksum How to use checksums |
f4533cc21083cc56575b37ed050f5a9644a42829391801eac2c81d998958d82c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / attrcheck-0.1.2-py2.7.egg
| Download URL | attrcheck-0.1.2-py2.7.egg |
|---|---|
| Size | 5.8 kB |
| Tags | Egg |
|
SHA-256 checksum How to use checksums |
0031c61b6d3996ebcb0d5a000641156508efbf51e6c65da79aeaca4adacf09a9
|
|
BLAKE2b-256 checksum How to use checksums |
ff18ab0e75ff85b0cae037ecfb8f82b60a306d5205b6205d3507227f1b2954c1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for attrcheck 0.1.2
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.