Skip to main content

Amsterdam Datapunt code and style for Django REST Framework.

Project description

# 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:

`shell pip install drf_amsterdam `

To use the API page styling provided by this package you must add it to the Django settings file in INSTALLED_APPS, ahead of ‘rest_framework’ so that the templates and static files included in drf_amsterdam override those included with Django REST Framework.

## 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:

`shell 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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

drf_amsterdam-1.0.0.tar.gz (62.2 kB view details)

Uploaded Source

Built Distribution

drf_amsterdam-1.0.0-py3-none-any.whl (64.4 kB view details)

Uploaded Python 3

File details

Details for the file drf_amsterdam-1.0.0.tar.gz.

File metadata

  • Download URL: drf_amsterdam-1.0.0.tar.gz
  • Upload date:
  • Size: 62.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.2 CPython/3.11.7

File hashes

Hashes for drf_amsterdam-1.0.0.tar.gz
Algorithm Hash digest
SHA256 995082907692f3f0c706de9fac488d5ed548f1c0a04af704349cfaeb8718b5e5
MD5 8aafc03ef3631d83848a5e5b6050826d
BLAKE2b-256 c1221a37545351c63c24a910ed0de3ca2bbea343d6011036b18ea94ed1b827f0

See more details on using hashes here.

File details

Details for the file drf_amsterdam-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for drf_amsterdam-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6738b2d5956be80d5ad0bae2d776e092ca335a0221289876b92072d2d9389ab3
MD5 0f563226cb462e71ccd103c6c57cb36c
BLAKE2b-256 13e3723b1be0bb71d0be35949e043c9f04be17ee9ec14fac84284ee5cf6a10f3

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page