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 Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

lxcor_docca-0.1.1-py3-none-any.whl (35.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: lxcor_docca-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 35.4 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c23080b2de79785769f789c29c4fc914766ac29df41767c8d934649c52a5ec84
MD5 504750193087576ca905c78f6ee32fdb
BLAKE2b-256 c399d44cba6de6e2e758c989a6061e919cd30f978d9365be4b513d06d9e1d84f

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