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
class MyClass:
def __init__(self):
self.private_method()
self.protected_method()
self.fileprivate_method()
self.public_method()
@private()
def private_method(self):
print(self.__private)
@protected()
def protected_method(self):
print(self._protected)
@fileprivate()
def fileprivate_method(self):
print(self.__fileprivate)
def public_method(self):
self.__private_method()
self._protected_method()
self.__fileprivate_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.2.tar.gz
(15.7 kB
view details)
Built Distribution
File details
Details for the file pythonpermission-0.0.2.tar.gz
.
File metadata
- Download URL: pythonpermission-0.0.2.tar.gz
- Upload date:
- Size: 15.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 | 59d54cbab9e8528a7e0b531dbb5e098e5cb629087db7806049bd0edc6fb157c8 |
|
MD5 | 33feabcb327d7a7c1127da6a0c3a3332 |
|
BLAKE2b-256 | 1c844361365149763607874966b60fa7087c03d74bb28476f6c34e7290b250ac |
File details
Details for the file pythonpermission-0.0.2-py3-none-any.whl
.
File metadata
- Download URL: pythonpermission-0.0.2-py3-none-any.whl
- Upload date:
- Size: 15.4 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 | 4718b13002e7bf20aae3f785d855a282caac35d59cf8cf015f027b3e8d9e1356 |
|
MD5 | 219f663b37ea704a17e8bf4a6bd504d1 |
|
BLAKE2b-256 | eea41a3a5eccd5ca2464648c0c2c87d3263cc361cf054f8af5ba7ef0010b3a21 |