Skip to main content

Django REST Framework extensions by Amsterdam Datapunt

Extensions to Django REST Framework by Amsterdam Datapunt. Amsterdam Datapunt provides access to municipal data through, at times, public APIs. This project provides some basic classes and instructions to set the behavior of Django REST Framework API to the standards of Amsterdam Datapunt.

Installation instructions

Given that you have a Django project that generates a REST API using Django REST Framework:

pip install drf_amsterdam

To use the API page styling provided by this package, you need to add datapunt_api to the INSTALLED_APPS list in your Django settings file — before 'rest_framework'. This ensures that the templates and static files included in datapunt_api override those provided by Django REST Framework, so the custom styling is applied correctly.

Building and running the application

If you want to use this package in a local project setup:

pip install -r requirements.txt
python manage.py migrate
python manage.py runserver

Note: This package itself is not a standalone application, but is designed to be integrated into an existing Django project.

Running tests

Run the tests in a virtualenv and run the script runtests.py from project root.

requirements: spatialite, sqlite extension

or use docker-compose:

docker compose build
docker compose run --rm tests pytest --cov

Changelog

1.0.0

  • Added types
  • Tidied up code
  • Added tests to reach 100% code coverage

Breaking changes

  • LinksField now extends RelatedField instead of HyperLinkedIdentityField. The reason for this is that HyperLinkedIdentityField has to return a HyperLink object in order to comply with the rules of covariance, which is not what we desire it to return.

Release files for drf-amsterdam 1.1.1

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

Source distribution (sdist)

Source distribution for drf-amsterdam 1.1.1
File Size Uploaded
drf_amsterdam-1.1.1.tar.gz 62.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for drf-amsterdam 1.1.1
File Interpreter ABI Platform
drf_amsterdam-1.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 127.6 kB

Release files / drf_amsterdam-1.1.1.tar.gz

Download URL drf_amsterdam-1.1.1.tar.gz
Size 62.8 kB
Tags Source
SHA-256 checksum
How to use checksums
df98fc2b9d7f19b140020ea005ec986341b46191aff222bf86caf7d031525351
BLAKE2b-256 checksum
How to use checksums
ade092128be0e064c171bb80953ec5b9a805750a80e520de4c788046c5430b90
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jan 27, 2026.

Transparency log

Release files / drf_amsterdam-1.1.1-py3-none-any.whl

Download URL drf_amsterdam-1.1.1-py3-none-any.whl
Size 64.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
077ca0e421a29ee8e381eca8457b2ef526df955a942e77fffc63aa3a82ebc335
BLAKE2b-256 checksum
How to use checksums
e1a7fd66eab6c80444669bcaaa609f8edcd3534393dda5b06d1ae7eb389a7648
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jan 27, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

1.1.1 This release

2 release files

1.1.0

2 release files

1.0.3

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3.0

1 release file

0.2.4

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.1.9

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.6

1 release file

0.1.5

1 release file

0.1.4

1 release file

0.1.3

2 release files

0.1.2

2 release files

0.1.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