Static typed-style access modifiers and patterns for Python
Project description
🐍 lockpy — Access Control for Python
lockpy brings powerful, enforced access control patterns to Python — something you normally only get in languages like Java or C#.
It provides decorators like:
@singleton— ensures only one instance of a class exists.@private— prevents external access to methods (enforced at runtime).- I'm currently working on modifiers like :
@protected,@final,@readonly- will include in other releases
🚀 Features
Lightweight: no dependencies requiredInspired from static typed languaged: private/protected/final behaviorRuntime Enforcement: enfore rules at runtime (no special interpreter required)Flexible: works with instance methods, classmethods, and staticmethods
📦 Installation
pip install lockpy
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
lockpy-1.0.0.tar.gz
(3.8 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 lockpy-1.0.0.tar.gz.
File metadata
- Download URL: lockpy-1.0.0.tar.gz
- Upload date:
- Size: 3.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7d141a6b2c54a1e40718e1bea10363e08ca7682b3a0eaee2d5439e263dd2ef8f
|
|
| MD5 |
de94df250706e813a476281c916cd921
|
|
| BLAKE2b-256 |
8974096f1450d6820b5c0db0871173b52a352369baab26c554717d996eb3a6c4
|
File details
Details for the file lockpy-1.0.0-py3-none-any.whl.
File metadata
- Download URL: lockpy-1.0.0-py3-none-any.whl
- Upload date:
- Size: 4.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f6c0571353ef52a75219d75202a1ac9f6da171ef8d57495ea3baa8d14bba273f
|
|
| MD5 |
9d5fb17e964328923591005049c1d365
|
|
| BLAKE2b-256 |
57b36ab4451bdfaf35dc3e27c6c0adf4eca7d063c104c46203923666466cdf01
|