Metadata-Version: 2.1
Name: perm-banana
Version: 0.2.1
Summary: A Bitwise Permission Handler
Home-page: https://github.com/TheJoeSmo/perm-banana
License: MIT
Keywords: permissions,bitwise
Author: TheJoeSmo
Author-email: joesmo.joesmo12@gmail.com
Requires-Python: >=3.7,<4.0
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Project-URL: Repository, https://github.com/TheJoeSmo/perm-banana
Description-Content-Type: text/markdown


# Perm-Banana

#### A package to enable easy permission creation inside Python.

![test](https://github.com/TheJoeSmo/perm-banana/actions/workflows/tests.yml/badge.svg)

#### How to use it?

```python
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")
```

