Skip to main content

A ready-to-use package to add drf-spectacular docs to your DRF API.

Project description

Django simple Docs

This is a django app to easily configure drf_spectacular.

Instalation

Installing from PyPI:

pip install django-simple-docs

Add the following settings in your project:

INSTALLED_APPS = [
    ...,
    "django_simple_docs",
    "drf_spectacular",
    ...,
]

REST_FRAMEWORK = {
    ...,
    "DEFAULT_SCHEMA_CLASS": "drf_spectacular.openapi.AutoSchema",
    ...,
}

And, finally, configure the URLs:

urlpatterns = [
    ...,
    path("api/docs/", include("django_simple_docs.urls")),
    ...,
]

Now, you can go to http://localhost:8000/api/docs/ and browse the OpenAPI docs in your browser.

Rationale

This is a simply configured drf_spectacular package for quickly getting started with having OpenAPI docs withour much fuss. If you need more customization, this package is probably not for you.

Virtual Environment

Create a virtual Environment

virtualenv .venv -p pytthon 3.14
source .venv/bin/activate

Tests

Using pytest for Tests

python -m pytest

Formatting and Linting

Using pre-commit for linting and formatting

pre-commit install
pre-commit run --all-files

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.

django_simple_docs-1.0.0-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

Details for the file django_simple_docs-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for django_simple_docs-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8ebbab39f51d61b97eb1109801113e0f721f09f6d2a367d94e43acd825654d3d
MD5 57a4578bca75f299dcd07560d9ee574d
BLAKE2b-256 7913d5dab793f23a81d6d3229154f7114e2194f51baeb868b2fb25ce2646e392

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