A Bitwise Permission Handler
Project description
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")
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
perm_banana-0.2.1.tar.gz
(6.4 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file perm_banana-0.2.1.tar.gz.
File metadata
- Download URL: perm_banana-0.2.1.tar.gz
- Upload date:
- Size: 6.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.8 CPython/3.7.11 Linux/5.8.0-1040-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c66c8f790a197c97137a393fdb8a9f35dc5d58df64eca8f43f62d56e58b8e226
|
|
| MD5 |
f92ceaf160be3d57b602d70c7550a80b
|
|
| BLAKE2b-256 |
0c81540637871af5a860f56635b60edad156c271567cd55249431c11a569d0a4
|
File details
Details for the file perm_banana-0.2.1-py3-none-any.whl.
File metadata
- Download URL: perm_banana-0.2.1-py3-none-any.whl
- Upload date:
- Size: 10.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.8 CPython/3.7.11 Linux/5.8.0-1040-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b1b3a861e0ab249ec5c11207053af927504c2207cadf1d223309eeb0053314a7
|
|
| MD5 |
d2bc91541c6e74cd081560e033638e72
|
|
| BLAKE2b-256 |
30158029e9c2325f92c759e94acd8ade83df94e9fa735c1374022107e07fd295
|