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
Release files for PythonPermission 0.0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pythonpermission-0.0.4.tar.gz | 29.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pythonpermission-0.0.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 57.8 kB
Release files / pythonpermission-0.0.4.tar.gz
| Download URL | pythonpermission-0.0.4.tar.gz |
|---|---|
| Size | 29.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2ddb1b378f3c27f6090acd43ceb04e445df1821bc65b0d1c741da6733d598324
|
|
BLAKE2b-256 checksum How to use checksums |
998fdb31ccc3511937447070c5b02575373c9f810303335cdfec87f4e91ddf43
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.9.18
|
Release files / pythonpermission-0.0.4-py3-none-any.whl
| Download URL | pythonpermission-0.0.4-py3-none-any.whl |
|---|---|
| Size | 28.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7c2a3a2cfee776d022c9627192402dadbea9075f5a5e6d2e20fb7ba3722efdb2
|
|
BLAKE2b-256 checksum How to use checksums |
265c7b343ad6f2346824a5602b017db4536b3665364153ef9e7f6b6d466c9940
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.9.18
|