Skip to main content

Django RESTframework-api key - Allow by key names

Decorator working with djangorestframework-api-key allowing to restrict access to a method according to the key presented.

Usage

Use @allow_only_apikey() with a list of key names as the first parameter :

from rest_framework_api_key_allowbynames.decorator import allow_only_apikey

class TelegramMemberCheck(APIView):
    permission_classes = [HasAPIKey]

    @allow_only_apikey(['TelegramBot'])
    def get(self, request, format=None):
        pass

If the key does not match, an AuthenticationFailed is returned.

Metadata

Release files for djangorestframework-api-key-allowbynames 1.0.2

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

Source distribution (sdist)

Source distribution for djangorestframework-api-key-allowbynames 1.0.2
File Size Uploaded Provenance Actions
djangorestframework-api-key-allowbynames-1.0.2.tar.gz 3.0 kB Without provenance Details for djangorestframework-api-key-allowbynames-1.0.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for djangorestframework-api-key-allowbynames 1.0.2
File Interpreter ABI Platform Actions
djangorestframework_api_key_allowbynames-1.0.2-py3-none-any.whl Python 3 none any Details for djangorestframework_api_key_allowbynames-1.0.2-py3-none-any.whl

Total release size: 6.6 kB

Release files / djangorestframework-api-key-allowbynames-1.0.2.tar.gz

Download URL djangorestframework-api-key-allowbynames-1.0.2.tar.gz
Size 3.0 kB
Tags Source
SHA-256 checksum
How to use checksums
6f4e2895bd81b588fa1292bf6647638c46d14978b68bb64903d47e242c116978
BLAKE2b-256 checksum
How to use checksums
16d4a5947f56f6509589f77e37696ddb368fc9bfa7e7377992b93a567bb061ef
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.5

Release files / djangorestframework_api_key_allowbynames-1.0.2-py3-none-any.whl

Download URL djangorestframework_api_key_allowbynames-1.0.2-py3-none-any.whl
Size 3.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
89faef90a6d4c9de7308937204680d2dd2b2f3962bcc2ecd875f6b6abd3320e5
BLAKE2b-256 checksum
How to use checksums
68a46e950658ca04c112f15dcff5e2a992baf5f0e18c21fc206df827bf25923a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.5

Security for djangorestframework-api-key-allowbynames 1.0.2

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