A simple constant enforcement utility for Python
Project description
pyconstlock
A simple Python utility to enforce constant variables.
Installation
pip install pyconstlock
Usage
from pyconstlock import Const
const = Const()
const.API_KEY = "abc123"
const.MAX_USERS = 50
const.APP_NAME = "My App"
print(const.API_KEY)
print(const.MAX_USERS)
print(const.APP_NAME)
const.MAX_USERS = 100 # error
Features
-Prevent reassignment
-Prevent deletion
-Enforce uppercase naming
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
pyconstlock-0.1.1.tar.gz
(1.7 kB
view details)
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 pyconstlock-0.1.1.tar.gz.
File metadata
- Download URL: pyconstlock-0.1.1.tar.gz
- Upload date:
- Size: 1.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3246b734ebbf1ef843c096d1f95621fd8c2c025ec1fd173ac1d648bbbdf8d8af
|
|
| MD5 |
85e1737a2c65baaa0d37d462fc5c538a
|
|
| BLAKE2b-256 |
4695de79017f0c6e9817ed8594cb7809a43a49d4f6613b28efc81e788391c130
|
File details
Details for the file pyconstlock-0.1.1-py3-none-any.whl.
File metadata
- Download URL: pyconstlock-0.1.1-py3-none-any.whl
- Upload date:
- Size: 2.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d50d8d6ce68f164ef07986c1eb57c208529f9846862c0a4337a33707d58a95e9
|
|
| MD5 |
99c5200c61b89920947b566b940c8f44
|
|
| BLAKE2b-256 |
823c38dccb3ffceb81ef9441568f8526715d883da59768e328c086db4d102694
|