Skip to main content

Simple user authorization to use alongside with Flask-Login

Project description

Flask-Authorization

Downloads Downloads Downloads

Simple user authorization to use alongside with Flask-Login.

Installation

pip3 install Flask-Authorization

Usage

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

flask-authorization-1.6.tar.gz (2.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

flask_authorization-1.6-py3-none-any.whl (3.2 kB view details)

Uploaded Python 3

File details

Details for the file flask-authorization-1.6.tar.gz.

File metadata

  • Download URL: flask-authorization-1.6.tar.gz
  • Upload date:
  • Size: 2.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.13 CPython/3.10.2 Darwin/21.4.0

File hashes

Hashes for flask-authorization-1.6.tar.gz
Algorithm Hash digest
SHA256 770d4334e7cb9cdd55c7b67988b0d61555311574a4bdd0bbfbe5adfe8cdc3bcd
MD5 dbd9b6d84ea171ea61bc58cd2edbfb15
BLAKE2b-256 5eb29bcb5b3965d49fd9dcdd923d3bc01a57b93e4b0324e8983a5ece181dfb86

See more details on using hashes here.

File details

Details for the file flask_authorization-1.6-py3-none-any.whl.

File metadata

  • Download URL: flask_authorization-1.6-py3-none-any.whl
  • Upload date:
  • Size: 3.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.13 CPython/3.10.2 Darwin/21.4.0

File hashes

Hashes for flask_authorization-1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 e86fdc06231a5eebe9bdf70fd1622508fa014bb28c716f3c0226aa20e14fa7d4
MD5 9e156e5197328c8c4b3f71211bfd3f7f
BLAKE2b-256 6ffb890d6b77eb13ed3f13b0abef148021a5a3e77dcd48755b4a9b7edf7d241f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page