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

Warning — syncdocs is authoritative for summary and description. Every run re-reads the view docstrings and overwrites those two fields in the database. Edits made directly to the DB or to fixture files will be lost on the next syncdocs run. To set a permanent custom summary, update the view or method docstring instead.

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.2.tar.gz (25.5 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.2-py3-none-any.whl (32.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: lxcor_docca-0.1.2.tar.gz
  • Upload date:
  • Size: 25.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for lxcor_docca-0.1.2.tar.gz
Algorithm Hash digest
SHA256 e800af072d59b246355f4c223dc68e06c2c4be1e4b41c03c466688411d3784f7
MD5 2b7c7dfc1e0822f0d2a9d96ed44ee711
BLAKE2b-256 e57db7d2ca9affe28fa61e5077c78b974fa7493541b6232c6878a9baad6d29e0

See more details on using hashes here.

File details

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

File metadata

  • Download URL: lxcor_docca-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 32.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for lxcor_docca-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 502312c5fdc0c64fde9a72677f38c9bb2e83039cf3a43be620c5c2813ca54bda
MD5 a80444e5db32512f1fb6907d1178e72b
BLAKE2b-256 6347ae6ec814c4ae7c6ea050a91432b1ca077d8b15c4420d24d7679347141a6c

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