A Django app to help make building APIs great.
Project description
Django Dans API Toolkit
Description
A Django app to help make building APIs great.
This app is meant to be a collection of tools to help with common API tasks, and is not meant to be a full-fledged API solution. It is meant to be used in conjunction with Django Rest Framework, and is not a replacement for it.
Quick start
- Install the package via pip:
pip install django-dans-api-toolkit
- Add
django_dans_api_toolkit
to your INSTALLED_APPS setting like this:
INSTALLED_APPS = [
...
'django_dans_api_toolkit',
]
-
Run
python manage.py migrate
to update your database schema. -
Use the API endpoints, in code or your Django admin portal.
Requirements
TODO validate these
- Python 3.10 - 3.11
- Django 3.1 or higher
- Django Rest Framework
- NOTE: not only must you have this installed, you must have set
DEFAULT_AUTHENTICATION_CLASSES
andDEFAULT_PAGINATION_CLASS
in yoursettings.py
to work with the APIs properly. An example config would be:
- NOTE: not only must you have this installed, you must have set
REST_FRAMEWORK = {
"DEFAULT_PAGINATION_CLASS": "rest_framework.pagination.PageNumberPagination",
"PAGE_SIZE": 20,
"DEFAULT_AUTHENTICATION_CLASSES": (
"rest_framework.authentication.TokenAuthentication",
),
}
Features
This app is meant to be a collection of tools to help with common API tasks, and is not meant to be a full-fledged API solution. It is meant to be used in conjunction with Django Rest Framework, and is not a replacement for it.
Some of the features include:
- API response handler -
api_response_handler.py
- API response renderer -
api_response_renderer.py
- Base serializer -
serializers/base.py
https://danielnazarian.com
Copyright 2024 © Daniel Nazarian.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for django-dans-api-toolkit-0.1.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | e363c6b1e52c9f2f6b80cdd4521594ad64c66cef8ce11fb419250ea80be6c159 |
|
MD5 | 354a928d8d1f6b47cb80f63b34b4b27a |
|
BLAKE2b-256 | bad9f7fd87323137015c8bc36fb86f43b2d32874c757372f4bf30b58771eb2f7 |
Hashes for django_dans_api_toolkit-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4f426d16fec402bc952f4eff01ceebdaadb37f7f8cf940d3ea4499fe55efb39e |
|
MD5 | 3220d83de29a11d5a9c19e4d8bd06641 |
|
BLAKE2b-256 | 2c118519a8a48cc622e829ccf72d719b6a7c46c173eec387bec371cdc457e125 |