Django Hawk DRF
This package provides Django Rest Framework helper classes for use with Django Hawk.
Installation
Read the Django Hawk installation documentation.
Example usage
Read the Django Hawk example usage documentation.
Add the HawkResponseMiddleware to the MIDDLEWARE setting in your project like so:
MIDDLEWARE = [
...
"django_hawk.middleware.HawkResponseMiddleware",
"django_hawk_drf.middleware.HawkResponseMiddleware",
...
]
To check the you can use the django_hawk.authentication.HawkAuthentication authentication class.
from rest_framework.response import Response
from rest_framework.viewsets import ViewSet
from django_hawk_drf.authentication import HawkAuthentication
class ExampleViewSet(ViewSet):
authentication_classes = (HawkAuthentication,)
permission_classes = ()
def list(self, request):
return Response([])
Testing
Tests belong in the /django_hawk_drf/tests/ directory. You can run the tests by installing the requirements like so:
make setup
Now you can run the tests using the following command:
poetry run python manage.py test
Tox tests
We use tox to test compatibility across different Django versions.
To run these tests with tox, just run the following:
make tox
Pushing to PyPI
Running make build-package will build the package into the dist/ directory
Running make push-pypi-test will push the built package to Test PyPI
Running make push-pypi will push the built package to PyPI
Metadata
Release files for django-hawk-drf 1.1.5
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_hawk_drf-1.1.5.tar.gz | 5.6 kB | Without provenance | Details for django_hawk_drf-1.1.5.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| django_hawk_drf-1.1.5-py3-none-any.whl | Python 3 | none | any | Details for django_hawk_drf-1.1.5-py3-none-any.whl |
Total release size: 13.4 kB
Release files / django_hawk_drf-1.1.5.tar.gz
| Download URL | django_hawk_drf-1.1.5.tar.gz |
|---|---|
| Size | 5.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e877cdbf19e92403d58cdcf05ae250cd984c5d7926902ba84b5568fdee80594b
|
|
BLAKE2b-256 checksum How to use checksums |
56ebcdab1b8665c50c6a3347374e9c40be550bb82531d95a57cbb99225adf1ec
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.3 CPython/3.12.4 Darwin/24.5.0
|
Release files / django_hawk_drf-1.1.5-py3-none-any.whl
| Download URL | django_hawk_drf-1.1.5-py3-none-any.whl |
|---|---|
| Size | 7.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
418bb73177e6576503ab1ad59670bf3744639278b89fd9d9b32a404fb6524ed1
|
|
BLAKE2b-256 checksum How to use checksums |
22920a85091ce0ff8e8169fe0e8d802262b265c0e0c08dac2799176114ce5d45
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.3 CPython/3.12.4 Darwin/24.5.0
|
Security for django-hawk-drf 1.1.5
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.