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, fileprivate, protected and internal 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.4.tar.gz
(29.6 kB
view details)
Built Distribution
File details
Details for the file pythonpermission-0.0.4.tar.gz
.
File metadata
- Download URL: pythonpermission-0.0.4.tar.gz
- Upload date:
- Size: 29.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2ddb1b378f3c27f6090acd43ceb04e445df1821bc65b0d1c741da6733d598324 |
|
MD5 | 3e800e6f5f76f08d424039e73bb7b90b |
|
BLAKE2b-256 | 998fdb31ccc3511937447070c5b02575373c9f810303335cdfec87f4e91ddf43 |
File details
Details for the file pythonpermission-0.0.4-py3-none-any.whl
.
File metadata
- Download URL: pythonpermission-0.0.4-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 | 7c2a3a2cfee776d022c9627192402dadbea9075f5a5e6d2e20fb7ba3722efdb2 |
|
MD5 | 028d9296ffa4d366b950d3b63d7508f6 |
|
BLAKE2b-256 | 265c7b343ad6f2346824a5602b017db4536b3665364153ef9e7f6b6d466c9940 |