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 hashes)
Built Distribution
Close
Hashes for perm_banana-0.2.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b1b3a861e0ab249ec5c11207053af927504c2207cadf1d223309eeb0053314a7 |
|
MD5 | d2bc91541c6e74cd081560e033638e72 |
|
BLAKE2b-256 | 30158029e9c2325f92c759e94acd8ade83df94e9fa735c1374022107e07fd295 |