Simple mods for python classes.
Project description
classmods
classmods is a lightweight Python package designed to enhance class behavior with minimal effort. It provides modular decorators and descriptors to automate and simplify class-related tasks like environment variable management, creating example env files, monitoring, logging, and more.
Documentation
All features are well documented and use a high level of type_hints for easy understanding and usage.
Features
(Click names for more information)
ConstantAttrib: A descriptor that acts like a constant. Once set, the value cannot be changed. RaisesAttributeErroron change detection.RemoteAttrib: A descriptor that acts as a remote attribute. You can modify the mapped value on-the-fly.ENVMod: The main API class for managing.envvariables. Supports manual and decorator-based registration of environment items, type-safe value loading, and.env_examplegeneration.MethodMonitor: A class to monitor method calls of a target class, triggering a handler function after the method is called.logwrap: A dynamic decorator to log function calls. Uses theloggingmodule with your current project configurations.suppress_errors: A decorator that suppresses exceptions raised by the wrapped function and returns a fallback value instead.
Installation
- Easy install with pip
pip install classmods
- Install with git+pip
pip install git+https://github.com/hmohammad2520-org/classmods
License
MIT License
Made with ❤️ by hmohammad2520
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file classmods-1.2.2.tar.gz.
File metadata
- Download URL: classmods-1.2.2.tar.gz
- Upload date:
- Size: 15.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0bf8774c22e6ef020521d8066cb3c95b4e78ed6397f11da59d222a4775a3c81e
|
|
| MD5 |
8c0b8f53cc7c7af089d42679af7dc143
|
|
| BLAKE2b-256 |
94ec19025ce82579e7bfedf0ac10ee0e54694f4e4d840462f75bf0b04b5e4740
|
Provenance
The following attestation bundles were made for classmods-1.2.2.tar.gz:
Publisher:
python-publish.yml on hmohammad2520-org/classmods
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
classmods-1.2.2.tar.gz -
Subject digest:
0bf8774c22e6ef020521d8066cb3c95b4e78ed6397f11da59d222a4775a3c81e - Sigstore transparency entry: 883742816
- Sigstore integration time:
-
Permalink:
hmohammad2520-org/classmods@9445171b3ba39c6528c8841f6165257461d251a6 -
Branch / Tag:
refs/tags/1.2.2 - Owner: https://github.com/hmohammad2520-org
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@9445171b3ba39c6528c8841f6165257461d251a6 -
Trigger Event:
release
-
Statement type:
File details
Details for the file classmods-1.2.2-py3-none-any.whl.
File metadata
- Download URL: classmods-1.2.2-py3-none-any.whl
- Upload date:
- Size: 15.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9a3443aae7128e02ba522a897e0070fd2661d72c2185a9e1d6f756ffee44221d
|
|
| MD5 |
f3176ac47059ceddce240b29cbb192f7
|
|
| BLAKE2b-256 |
e043416adb09a9e40f035de6875a276c22aecee7722e31fafa531cacba25ccb8
|
Provenance
The following attestation bundles were made for classmods-1.2.2-py3-none-any.whl:
Publisher:
python-publish.yml on hmohammad2520-org/classmods
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
classmods-1.2.2-py3-none-any.whl -
Subject digest:
9a3443aae7128e02ba522a897e0070fd2661d72c2185a9e1d6f756ffee44221d - Sigstore transparency entry: 883742861
- Sigstore integration time:
-
Permalink:
hmohammad2520-org/classmods@9445171b3ba39c6528c8841f6165257461d251a6 -
Branch / Tag:
refs/tags/1.2.2 - Owner: https://github.com/hmohammad2520-org
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@9445171b3ba39c6528c8841f6165257461d251a6 -
Trigger Event:
release
-
Statement type: