Skip to main content

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)

Source distribution for django-hawk-drf 1.1.5
File Size Uploaded
django_hawk_drf-1.1.5.tar.gz 5.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for django-hawk-drf 1.1.5
File Interpreter ABI Platform
django_hawk_drf-1.1.5-py3-none-any.whl Python 3 none any Details

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

Release history Release notifications | RSS feed

This release

1.1.5 This release

2 release files

1.1.4

2 release files

1.1.3

2 release files

1.1.2

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.0

2 release files

0.0.1

2 release files

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