flask-authorization-1.6
توضیحات
Simple user authorization to use alongside with Flask-Login
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | flask-authorization-1.6 |
| نام | flask-authorization |
| نسخه کتابخانه | 1.6 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Marcel Kröker |
| ایمیل نویسنده | kroeker.marcel@gmail.com |
| آدرس صفحه اصلی | https://github.com/mkrd/flask-authorization |
| آدرس اینترنتی | https://pypi.org/project/flask-authorization/ |
| مجوز | MIT |
# Flask-Authorization
[](https://pepy.tech/project/flask-authorization)
[](https://pepy.tech/project/flask-authorization)
[](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.
نیازمندی
| مقدار | نام |
|---|---|
| >=2.0.1,<3.0.0 | Flask |
| >=0.5.0,<1.0.0 | flask-login |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.8,<4.0 | Python |
نحوه نصب
نصب پکیج whl flask-authorization-1.6:
pip install flask-authorization-1.6.whl
نصب پکیج tar.gz flask-authorization-1.6:
pip install flask-authorization-1.6.tar.gz