Metadata-Version: 2.1
Name: flask-authorization
Version: 1.6
Summary: Simple user authorization to use alongside with Flask-Login
Home-page: https://github.com/mkrd/flask-authorization
License: MIT
Author: Marcel Kröker
Author-email: kroeker.marcel@gmail.com
Requires-Python: >=3.8,<4.0
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Requires-Dist: Flask (>=2.0.1,<3.0.0)
Requires-Dist: flask-login (>=0.5.0,<1.0.0)
Project-URL: Repository, https://github.com/mkrd/flask-authorization
Description-Content-Type: text/markdown

# Flask-Authorization

[![Downloads](https://pepy.tech/badge/flask-authorization)](https://pepy.tech/project/flask-authorization)
[![Downloads](https://pepy.tech/badge/flask-authorization/month)](https://pepy.tech/project/flask-authorization)
[![Downloads](https://pepy.tech/badge/flask-authorization/week)](https://pepy.tech/project/flask-authorization)

Simple user authorization to use alongside with Flask-Login.

## Installation
```
pip3 install Flask-Authorization
```

## Usage
```python
from flask_Authorization import Authorize
authorize = Authorize()

# Initialize Extension
authorize.init_app(app)
```

For Flask-Authorization to work properly, your user models needs to implement a function called `get_permissions()` that returns a list of permissions. You can define any permissions you like, but `"ROOT", "ADMIN", "USER"` are recommended.
Flask-Authorization will check if the current user has the required permissions on routes decorated with the `@flask_authorization.permission_required(permission)` decorator.

