Skip to main content

exceptional_auth

The purpose of this package is to provide a more flexible/powerful replacement for Django's login_required and permission_required decorators (and provide some entirely new related functionality).

The idea is to create a standard set of exceptions which any code can raise (even reusable apps distributed on pypi), and leave the handling of these exceptions up to the site developer (via custom middleware). This makes the many per-view decisions easy (ie. just raise PermissionDenied), while letting you centralize/delay the decision of what to do in those situations. Since you have access to the request object in the middleware methods, you can easily tailor the handling of these exceptions base on section of site, request type, etc.

We provide exceptional_auth.BaseMiddleware, a Middleware base class which makes it easier to handle our exceptions. Site developers should write a custom middleware extending this class, and add to MIDDLEWARE setting. You can also use exceptional_auth.BaseMiddleware to start with, and then extend it later.

Metadata

Release files for exceptional-auth 0.7.0

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

Source distribution (sdist)

Source distribution for exceptional-auth 0.7.0
File Size Uploaded Provenance
exceptional_auth-0.7.0.tar.gz 6.4 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for exceptional-auth 0.7.0
File Interpreter ABI Platform
exceptional_auth-0.7.0-py3-none-any.whl Python 3 none any Details

Total release size: 14.6 kB

Release files / exceptional_auth-0.7.0.tar.gz

Download URL exceptional_auth-0.7.0.tar.gz
Size 6.4 kB
Tags Source
SHA-256 checksum
How to use checksums
3e990835643ebed1d620a68ebef4bd9679317ccc41f12857eff5418deb531a4c
BLAKE2b-256 checksum
How to use checksums
552bcf02412b509eacd094ad0224acc90f9e48b1ed0710f4fc7bf43b3991ffeb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.10

Release files / exceptional_auth-0.7.0-py3-none-any.whl

Download URL exceptional_auth-0.7.0-py3-none-any.whl
Size 8.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cddc2f2b92c4c5c7d2791984f199e4dc2e20a5b3bf75b1a45cb1a0cf41a7da28
BLAKE2b-256 checksum
How to use checksums
43ddf04db05885c65486e90aa44aaff1019f8131e6fb67cce30c268ade3bdfb7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.10

Security for exceptional-auth 0.7.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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