Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/phalt/django-api-domains
A pragmatic styleguide for Django API Projects
https://github.com/phalt/django-api-domains
api django django-rest-framework domains graphene-django graphql guide rest style styleguide
Last synced: 2 days ago
JSON representation
A pragmatic styleguide for Django API Projects
- Host: GitHub
- URL: https://github.com/phalt/django-api-domains
- Owner: phalt
- License: mit
- Created: 2019-01-09T11:41:16.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2023-11-13T21:28:31.000Z (about 1 year ago)
- Last Synced: 2025-01-10T11:59:58.486Z (3 days ago)
- Topics: api, django, django-rest-framework, domains, graphene-django, graphql, guide, rest, style, styleguide
- Language: Python
- Homepage: https://phalt.github.io/django-api-domains/
- Size: 602 KB
- Stars: 719
- Watchers: 21
- Forks: 61
- Open Issues: 16
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: docs/contributing.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
- awesome-starts - phalt/django-api-domains - A pragmatic styleguide for Django API Projects (Python)
README
⚠️ [Currently stable and unlikely to change much, provide feedback here](https://github.com/phalt/django-api-domains/issues/31) ⚠️
### Check out my new project for OpenAPI Clients: [Clientele](https://github.com/phalt/clientele)
![logo.png](diagrams/dads_logo.png)
# Django API Domains
_Style guides for the API age_| Version | Author(s) | Date |
| ----------------------------------------------------------------------- |-------------------------------------------|------------|
| [1.2.1](https://github.com/phalt/django-api-domains/releases/tag/1.2.1) | Paul Hallett [email protected] | 25-09-2019 |
| [1.2](https://github.com/phalt/django-api-domains/releases/tag/1.2) | Paul Hallett [email protected] | 10-06-2019 |
| [1.1](https://github.com/phalt/django-api-domains/releases/tag/1.1) | Paul Hallett [email protected] | 09-04-2019 |
| [1.0](https://github.com/phalt/django-api-domains/releases/tag/1.0) | Paul Hallett [email protected] | 01-02-2019 |## Introduction
This styleguide combines [domain-driven design](https://en.wikipedia.org/wiki/Domain-driven_design) principles and Django's [apps](https://docs.djangoproject.com/en/dev/ref/applications/#module-django.apps) pattern to provide a **pragmatic** guide for developing scalable API services with the Django web framework.
This styleguide tries to tackle two big problems:
1) Design philosophies and design patterns work in "ideal" situations, and most real life problems do not represent this ideal world. Therefore we need to develop a flexible pattern that can adjust to support different situations.
2) The original design and documentation of Django is geared heavily towards server-side-rendered-view applications, yet most modern Django applications are built to serve APIs for a separate frontend application. Therefore, Django's patterns are outdated for today's trends.In order to overcome these problems, this styleguide tries to achieve the following five goals:
1) Treat Django's `apps` more like software `domains`.
2) Extend Django's `apps` implementation to support strong [bounded context](https://www.martinfowler.com/bliki/BoundedContext.html) patterns between `domains`.
3) Enable separation of domains to happen when it makes sense for **increased development velocity**, not just for **business value**.
4) Design a styleguide that reduces the effort involved in extracting the code for large domains into separate application servers.
5) Make sure the styleguide compliments API-based applications.# Read the styleguide
The styleguide is now published as a readable documentation site. You can view it at [https://phalt.github.io/django-api-domains/](https://phalt.github.io/django-api-domains/) or view the [docs](docs/) folder directly.