$npx skillfedfor your agent

drf-spectacular

Sane and flexible OpenAPI 3 schema generation for Django REST framework

Worth itPyPI WWW/HTTPReleased Jul 202613.9M downloads / moBSD-3-ClausePure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — drf_spectacular-0.30.0-py3-none-any.whl
v0.30.0 · released 2026-07-06 · Python >=3.8 · 7 runtime deps: Django, djangorestframework, uritemplate, PyYAML, jsonschema, inflection, typing-extensions

Yes. drf-spectacular is actively maintained, has no known vulnerabilities, installs with low friction, and is licensed permissively. It solves a real problem—generating accurate OpenAPI documentation from Django REST framework code—and is widely used (top 5000 PyPI packages). Install it if you need OpenAPI schemas for a DRF API and want automation over manual maintenance.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires Django 3.2+ and Django REST Framework 3.12+; Python >= 3.8.
  • Low friction install with a pure-Python wheel.
  • Actively maintained with a recent release (39 days ago) and 2851 repository stars.

License · maintenance · safety

BSD-3-Clause (permissive) — Licensed under BSD-3-Clause (permissive), allowing commercial and private use with minimal restrictions—only requiring license and copyright notice inclusion.

last release 2026-07-06 (39 days) · last repo commit 2026-08-10 · 2,851 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 13,905,521 downloads/mo, #1,258 on PyPI

Verify before relying

pip install drf-spectacular

# In settings.py
INSTALLED_APPS = ['drf_spectacular']
REST_FRAMEWORK = {'DEFAULT_SCHEMA_CLASS': 'drf_spectacular.openapi.AutoSchema'}

# In urls.py
from drf_spectacular.views import SpectacularAPIView
urlpatterns = [path('api/schema/', SpectacularAPIView.as_view(), name='schema')]
  • Whether the package's schema generation works correctly with all listed framework versions without manual intervention.
  • Performance characteristics when generating schemas for large or deeply nested API structures.
  • Compatibility with third-party DRF extensions beyond those explicitly listed in the description.
Same gist for agents: .md · .json

What it is and what it does

drf-spectacular is an OpenAPI schema generator for Django REST framework that extracts API structure directly from your code and produces valid OpenAPI 3.0.3, 3.1, or 3.2 specifications. It replaces the basic schema generation built into DRF with a more capable alternative that handles real-world API patterns: nested and recursive serializers, polymorphic responses, custom authentication schemes, and vendor extensions. The package works out of the box with sensible defaults but offers deep customization through the @extend_schema decorator and settings, allowing you to override serializers, add examples, control operation IDs, and adjust how components are split.

The tool integrates with popular DRF extensions (SimpleJWT, django-filter, Pydantic, django-polymorphic) and provides built-in views to serve the schema via Swagger UI or Redoc. You can generate schemas via CLI (./manage.py spectacular) or serve them live from your API. It depends on Django, djangorestframework, uritemplate, PyYAML, jsonschema, inflection, and typing-extensions—all lightweight, widely-used libraries.

Use it for

  • Generate and serve interactive API documentation (Swagger UI or Redoc) directly from your Django REST framework code.
  • Export OpenAPI schemas for use with code generators (client SDKs, mock servers) or third-party API tools.
  • Document complex APIs with nested serializers, polymorphic responses, and custom authentication without manual schema writing.
  • Validate API schemas during CI/CD pipelines using the --validate CLI flag.
  • Customize schema output per-endpoint using @extend_schema decorators to override auto-detected types or add examples.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

Worth it

Yes.

drf-spectacular is actively maintained, has no known vulnerabilities, installs with low friction, and is licensed permissively. It solves a real problem—generating accurate OpenAPI documentation from Django REST framework code—and is widely used (top 5000 PyPI packages). Install it if you need OpenAPI schemas for a DRF API and want automation over manual maintenance.

Install

drf-spectacular on PyPI

Before you install

Low friction install with a pure-Python wheel. Actively maintained with a recent release (39 days ago) and 2851 repository stars. Depends on Django, djangorestframework, and several lightweight utilities (uritemplate, PyYAML, jsonschema, inflection, typing-extensions).

Requires Django 3.2+ and Django REST Framework 3.12+; Python >= 3.8.

License in practice

Licensed under BSD-3-Clause (permissive), allowing commercial and private use with minimal restrictions—only requiring license and copyright notice inclusion.

Quickstart

pip install drf-spectacular

# In settings.py
INSTALLED_APPS = ['drf_spectacular']
REST_FRAMEWORK = {'DEFAULT_SCHEMA_CLASS': 'drf_spectacular.openapi.AutoSchema'}

# In urls.py
from drf_spectacular.views import SpectacularAPIView
urlpatterns = [path('api/schema/', SpectacularAPIView.as_view(), name='schema')]

Verify before relying

  • Whether the package's schema generation works correctly with all listed framework versions without manual intervention.
  • Performance characteristics when generating schemas for large or deeply nested API structures.
  • Compatibility with third-party DRF extensions beyond those explicitly listed in the description.

Package facts

LicenseBSD-3-Clause permissive
Python supportSupports the current Python release >=3.8
Install frictionLow. Pure-Python wheel
Runtime dependencies
7 packages
DjangodjangorestframeworkuritemplatePyYAMLjsonschemainflectiontyping-extensions
MaintenanceActively maintained 39 days since the last release
Last repo commit
First released
Downloads13,905,521 / month, #1,258 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 5 - Production/StableEnvironment :: Web EnvironmentFramework :: DjangoFramework :: Django :: 2.2Framework :: Django :: 3.2Framework :: Django :: 4.0Framework :: Django :: 4.1Framework :: Django :: 4.2Framework :: Django :: 5.0Framework :: Django :: 5.1Framework :: Django :: 5.2Framework :: Django :: 6.0Intended Audience :: DevelopersNatural Language :: EnglishOperating System :: OS IndependentProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: DocumentationTopic :: Internet :: WWW/HTTPTopic :: Software Development :: Code Generators

Evidence: drf_spectacular-0.30.0-py3-none-any.whl

Tags

Capabilities
openapi schema generation djangodrf api documentationswagger ui django restrest framework openapiapi schema generator djangorest api documentation toolopenapi 3 django
Topics
api-documentationcode-generationdjango-extension
PyPI keywords
djangorestopenapischemaapiswagger

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “rest framework openapi”

Give your agent the search over MCP, or paste the wish link into any chat.

More WWW/HTTP packages

urllib3 Worth it
PyPI · Libraries · released May 2026

urllib3 is an HTTP client library that provides thread-safe connection pooling, SSL/TLS verification, multipart file uploads, request retries, compression support, and proxy handling for Python applications.

MITpure Python · 3.10+
1.8Bdownloads / mo
requests Worth it
PyPI · Libraries · released May 2026

Requests is a Python HTTP library that simplifies sending HTTP/1.1 requests with automatic handling of headers, authentication, cookies, and response parsing.

Apache-2.0pure Python · 3.10+
1.8Bdownloads / mo
h11 With conditions
PyPI · WWW/HTTP · released Apr 2025

h11 is a pure-Python HTTP/1.1 protocol implementation that handles parsing and serializing HTTP messages without any built-in I/O, letting you integrate it with any network layer you choose.

MITpure Python · 3.8+aging
894.9Mdownloads / mo
httpx Worth it
PyPI · WWW/HTTP · released Dec 2024

HTTPX is a fully featured HTTP client library for Python that provides both sync and async APIs, with support for HTTP/1.1 and HTTP/2, plus an integrated command-line client.

Install it if you are building new projects or modernizing existing ones that rely on HTTP.

BSD-3-Clausepure Python · 3.8+
797.0Mdownloads / mo
httpcore With conditions
PyPI · WWW/HTTP · released Apr 2025

A minimal low-level HTTP client library that sends HTTP requests with thread-safe and task-safe connection pooling, supporting HTTP/1.1, HTTP/2, proxies, and both sync and async interfaces.

BSD-3-Clausepure Python · 3.8+aging
783.6Mdownloads / mo
aiohttp Worth it
PyPI · WWW/HTTP · released Jul 2026

aiohttp is an async HTTP client and server framework built on asyncio, supporting both WebSockets and middleware-based routing for building concurrent web applications.

Install it if you need async HTTP client or server capabilities in asyncio-based applications.

permissive licensecompiled wheel · 3.10+
643.6Mdownloads / mo

See also drf-spectacular-jsonapi · drf-spectacular-sidecar · drf-yasg · drf-standardized-errors · flask-openapi3 · mkdocs-render-swagger-plugin · voluptuous-openapi · djangorestframework · flask-openapi3-swagger · drf-jsonschema-serializer