Perm-Banana
A package to enable easy permission creation inside Python.
How to use it?
from perm-banana import Permission, Check, banana
@banana
class MyPermission(Permission)
can_read_messages = Check(Permission(0b1))
can_write_messages = Check(Permission(0b10))
basic_user = can_read_message | can_write_messages
user = MyPermission(0b11)
if user.basic_user:
print("permission granted")
else:
print("permission denied")
Release files for perm-banana 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| perm_banana-0.2.1.tar.gz | 6.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| perm_banana-0.2.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 16.9 kB
Release files / perm_banana-0.2.1.tar.gz
| Download URL | perm_banana-0.2.1.tar.gz |
|---|---|
| Size | 6.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c66c8f790a197c97137a393fdb8a9f35dc5d58df64eca8f43f62d56e58b8e226
|
|
BLAKE2b-256 checksum How to use checksums |
0c81540637871af5a860f56635b60edad156c271567cd55249431c11a569d0a4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.8 CPython/3.7.11 Linux/5.8.0-1040-azure
|
Release files / perm_banana-0.2.1-py3-none-any.whl
| Download URL | perm_banana-0.2.1-py3-none-any.whl |
|---|---|
| Size | 10.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b1b3a861e0ab249ec5c11207053af927504c2207cadf1d223309eeb0053314a7
|
|
BLAKE2b-256 checksum How to use checksums |
30158029e9c2325f92c759e94acd8ade83df94e9fa735c1374022107e07fd295
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.8 CPython/3.7.11 Linux/5.8.0-1040-azure
|