Skip to main content

API documentation portal for Django REST Framework — auto-syncs endpoints, renders a searchable portal with tags, parameters, and response fields.

Project description

docca

API documentation portal for Django REST Framework.

docca auto-discovers your DRF viewsets and API views, syncs them into a database-backed manifest, and renders a searchable portal with tags, parameters, and response fields — no YAML, no decorators, no separate spec file.

Part of the lxcor/api-suite.

Install

pip install lxcor-docca

Setup

# settings.py
INSTALLED_APPS = [
    ...
    'docca',
]
# urls.py
from django.urls import path, include

urlpatterns = [
    path('docs/', include('docca.urls')),
]

Annotate your views:

class MySunriseViewSet(viewsets.ViewSet):
    docca_tag = 'Solar'
    docca_overview = 'Returns sunrise and sunset times for a given location and date.'

Sync endpoints into the database:

python manage.py syncdocs

Visit /docs/ to see the portal.

Settings

Setting Default Description
DOCCA_APP_COLORS {} Bootstrap color per app label ('warning', 'danger', etc.)
DOCCA_APP_DESCRIPTIONS {} Product-facing description per app, shown on the portal

Management commands

Command Description
syncdocs Discover and sync all DRF endpoints into the database
dumpdocs Export endpoint overviews to a JSON fixture
loaddocs Import endpoint overviews from a JSON fixture

License

MIT

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

lxcor_docca-0.1.0.tar.gz (23.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lxcor_docca-0.1.0-py3-none-any.whl (29.5 kB view details)

Uploaded Python 3

File details

Details for the file lxcor_docca-0.1.0.tar.gz.

File metadata

  • Download URL: lxcor_docca-0.1.0.tar.gz
  • Upload date:
  • Size: 23.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.8.10

File hashes

Hashes for lxcor_docca-0.1.0.tar.gz
Algorithm Hash digest
SHA256 ae0298102b43f038aa0ebd3c392301a0f5444f900a90b75ed9beb01d3c92dd20
MD5 acacc2000d0bf4b41f2a5f19e338a8e5
BLAKE2b-256 d8f3124e9cde3c0f1193da391d7b9791d9de0af6296f525b7a1245c40b73554f

See more details on using hashes here.

File details

Details for the file lxcor_docca-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: lxcor_docca-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 29.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.8.10

File hashes

Hashes for lxcor_docca-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 452f091bf5045b54c5e841975dddb5be0cf7a767c29650da6b7ccf14fe11a4f2
MD5 1269ebf06f02f54e6f1bb12c56ba7bec
BLAKE2b-256 886661944786a1e82cf1eb69a167a28f9d65cea60fb77a2052998ef8528fe0ef

See more details on using hashes here.

Supported by

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