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-0.2.0-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for django_simple_docs-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f7b295ceb6d739808acff5ecabf8dc1d91b364ba87c1cadcc56949eb1ad5c437
MD5 6f47419c86757d92cbf8321b895e3f28
BLAKE2b-256 f1470f4dd93189a5a2c7c0ff61482a5e216f02357d433b4bd6e625a94f0514b4

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