No project description provided
Project description
PythonPermission
Description
This package provide a simple way to manage element permissions in python. That is equivalent of the private, protected and protected access modifiers in other languages.
Installation
pip install PythonPermission
Usage
from PythonPermission import private, fileprivate, protected, internal
class MyClass:
def __init__(self):
self.private_method()
self.protected_method()
self.fileprivate_method()
self.internal_method()
self.public_method()
@private()
def private_method(self):
print("Private method")
@protected()
def protected_method(self):
print("Protected method")
@fileprivate()
def fileprivate_method(self):
print("Fileprivate method")
@internal()
def internal_method(self):
print("Internal method")
def public_method(self):
self.private_method()
self.protected_method()
self.fileprivate_method()
self.internal_method()
License
GNU General Public License v3.0
Author
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pythonpermission-0.0.3.tar.gz
(28.7 kB
view details)
Built Distribution
File details
Details for the file pythonpermission-0.0.3.tar.gz
.
File metadata
- Download URL: pythonpermission-0.0.3.tar.gz
- Upload date:
- Size: 28.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1b9d208bda86c75f054842e5d8a62e85919095c2e7b4910b90c8dc2d5e4da06a |
|
MD5 | 67eaab5dc45dfa2db20275cbf5dc3c8a |
|
BLAKE2b-256 | fa397bb7da57d140caa3038497c3554587a032f02c347949861cd2ed9c0198f1 |
File details
Details for the file pythonpermission-0.0.3-py3-none-any.whl
.
File metadata
- Download URL: pythonpermission-0.0.3-py3-none-any.whl
- Upload date:
- Size: 28.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | aeca2f914f18bdcbf1bf09925ebb08db6c76b5c3dc874dae17a85b6936661bca |
|
MD5 | f19eafbceb8b27528507cd818bdd0ece |
|
BLAKE2b-256 | b3cad48cbaccdd8411f8ef8d0662c837e0b522aa431ff70f2b8407fa16dec12d |