django-rest-framework-apikeys
=====
django-rest-framework-apikeys allows you to Authenticate your REST api with api keys on a per user basis.
Install
-----------
1. Install via pip::
pip install django-rest-framework-apikeys
Quick start
-----------
1. Add "django-rest-framework-apikeys" to your INSTALLED_APPS settings like this::
INSTALLED_APPS = [
...
'django_rest_framework_apikeys',
]
2. Add the authentication class::
REST_FRAMEWORK = {
'DEFAULT_AUTHENTICATION_CLASSES': (
...
'django_rest_framework_apikeys.authentication.APIKeyAuthentication',
)
}
3. Run `python manage.py migrate`.
4. Add urls to urlconf::
urlpatterns = [
...
url(r'^apikeys/', include("django_rest_framework_apikeys.urls")),
]
5. Send a POST request to /apikeys/create/ to create API Key for user or create via admin
6. Add 'x-api-key' to header to Authenticate via api key::
response = requests.get(
url="http://0.0.0.0:8000/endpoint,
headers={
"x-api-key": "fd8b4a98c8f53035aeab410258430e2d86079c93",
},
)
Metadata
Release files for django-rest-framework-apikeys 0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| django_rest_framework_apikeys-0.1.tar.gz | 4.4 kB | Without provenance | Details for django_rest_framework_apikeys-0.1.tar.gz |
Release files / django_rest_framework_apikeys-0.1.tar.gz
| Download URL | django_rest_framework_apikeys-0.1.tar.gz |
|---|---|
| Size | 4.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2d2c392f27403db0a647f7cf4464ae355991333c9719052ed5c4affd8fbdd060
|
|
BLAKE2b-256 checksum How to use checksums |
d26d744ecb39401e32a69c7e2d3cc1bb55585dd03f8d1df3ff2606cf76cf5089
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for django-rest-framework-apikeys 0.1
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.