touketsu is a tiny package for creating classes that disallow dynamic instance attribute creation or modification while preserving class inheritance. This project was inspired by all the unfortunate incidences where fat-finger errors led to the creation of a new instance attribute instead of the modification of an existing instance attribute.
Installation
On all systems, install the latest version from PyPI with
pip3 install --upgrade touketsu
After installing, check that the package is properly working using the interpreter, for example
>>> from touketsu import immutable >>> @immutable ... class a_class: ... def __init__(self, a = "a"): ... self.a = a >>> aa = a_class()
Attempting to execute aa.a = 5 will result in an AttributeError, as a_class instances are immutable.
Documentation
The documentation for touketsu is hosted on Read the Docs here.
Metadata
Release files for touketsu 0.1.1
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 |
|---|---|---|---|---|
| touketsu-0.1.1.tar.gz | 6.4 kB | Without provenance | Details for touketsu-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| touketsu-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for touketsu-0.1.1-py3-none-any.whl |
Total release size: 14.2 kB
Release files / touketsu-0.1.1.tar.gz
| Download URL | touketsu-0.1.1.tar.gz |
|---|---|
| Size | 6.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ec9447f7e797036e57bd894013e57878b2dea75fb8772c951f018ef331b9ff57
|
|
BLAKE2b-256 checksum How to use checksums |
df8a73666fc223d94bf0f63e79d54f92c28cb51d5bd277698f29e03cc88bb4c5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.0.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.7.6
|
Release files / touketsu-0.1.1-py3-none-any.whl
| Download URL | touketsu-0.1.1-py3-none-any.whl |
|---|---|
| Size | 7.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3ea36c838b452e7ef454ded3ab352cf256b8646ce55e15d8e96099635d94c5c8
|
|
BLAKE2b-256 checksum How to use checksums |
5be3aeb66bb36c3bd96f7f6e7658b25a44008554acfeb629935d24d37fea59ac
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.0.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.7.6
|
Security for touketsu 0.1.1
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.