Skip to main content
https://travis-ci.org/justanr/flask-allows.svg?branch=master https://coveralls.io/repos/github/justanr/flask-allows/badge.svg?branch=master

flask-allows

Are your permissions making too much noise all the time? Are your permissions stomping all over your actual code? Are your permission decorators clawing at your line count all the time? Think there’s no answer? There is! Flask-Allows.

Flask-Allows is an authorization tool for Flask inspired by django-rest-framework’s permissioning system and rest_condition’s ability to compose simple requirements into more complex ones.

Installation

Flask-Allows is available on pypi and installable with:

pip install flask-allows

Flask Allows supports 2.7, and 3.4+. Support for 3.3 was ended in the version 0.3 release.

More Information

Change Log

Version 0.7.1 (2018-10-03)

  • Added requirement name to deprecation message to make tracking down user-only requirements warnings easier.

Version 0.7 (2018-09-03)

  • Added flask_allows.view.guard_entire and flask_allows.views.exempt_from_requirements to make protecting entire blueprints easier.

  • Added __all__ export markers to flask_allows modules to prevent accidental re-export of other symbols when using from flask_allows.module import *

Version 0.6 (2018-05-26)

  • Permission no longer needs an application context for construction but does require one for evaluation now.

  • Added Allows.run a public helper that performs the complete fulfill and fail cycle. This cleans up the duplication between Allows.requires, requires and Permission.__enter__

  • Removed Permission.throw_type

  • Removed PermissionedView, PermissionedMethodView

  • Added ability to disable requirements already registered on routes and inside handlers via the flask_allows.overrides.OverrideManager class

  • Added ability to add more requirements to be run during checks on routes and other handlers via the flask_allows.additional.AdditionalManager class

Version 0.5.1 (2018-04-22)

  • Added wants_request to ease transition to user only requirements

Version 0.5 (2018-04-17)

  • Real documentation

  • Accepting request in requirements is now deprecated, pending removal in 1.0

  • Promoted internal _allows context local to part of the public interface

  • Bug Fix: ConditionalRequirement returned False when no requirements were provided

    it now returns True and mimics the behavior of all better

Version 0.4 (2017-08-29)

  • Clarify deprecation message for PermissionedView, will be removed in 0.6

  • Deprecate Permission.throw_type for 0.6 removak

  • Add optional on_fail for allows.requires and requires decoration

  • Fix coverage path problem with local testing

Version 0.3.2 (2017-08-29)

  • Fix package data not being included

Version 0.3.1 (2017-08-20)

  • Fix error that prevent sdist builds on 2.7

Version 0.3 (2017-08-20)

  • Drop official support for Python 3.3

  • Deprecate implicit decoration on class based views via the requirements attribute

Metadata

Release files for flask-allows 0.7.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for flask-allows 0.7.1
File Size Uploaded
flask-allows-0.7.1.tar.gz 14.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for flask-allows 0.7.1
File Interpreter ABI Platform
flask_allows-0.7.1-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 31.1 kB

Release files / flask-allows-0.7.1.tar.gz

Download URL flask-allows-0.7.1.tar.gz
Size 14.4 kB
Tags Source
SHA-256 checksum
How to use checksums
c6760e9ef6692cfbae8d50d4c16b987618301bc7ddc55b7667e1bc9cf3287aa0
BLAKE2b-256 checksum
How to use checksums
d490caa1eea65cf2d2e4d9d6be79ef7f4dfba4d36026110902e1c9e78c861486
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.7.0

Release files / flask_allows-0.7.1-py2.py3-none-any.whl

Download URL flask_allows-0.7.1-py2.py3-none-any.whl
Size 16.7 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
d30304801536c20e903605697a013de7106e02f2ab61c7243318f7a98980c044
BLAKE2b-256 checksum
How to use checksums
4a4eccd3a92eb331f1f2652f62cba496d28f3f9771888c3f467fe95f97b91562
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.7.0

Release history Release notifications | RSS feed

This release

0.7.1 This release

2 release files

0.7.0

2 release files

0.6.0

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.0

1 release file

0.1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page