python-drf-yasg
Port variant v14
Summary Django Swagger/OpenAPI spec generator (3.14)
Package version 1.21.14
Homepage https://github.com/axnsan12/drf-yasg
Keywords python
Maintainer Python Automaton
License Not yet specified
Other variants v13
Ravenports Buildsheet | History
Ravensource Port Directory | History
Last modified 18 JAN 2026, 19:34:33 UTC
Port created 16 APR 2018, 13:51:05 UTC
Subpackage Descriptions
single :alt: Live Demo **************** OpenAPI 3.0 note **************** If you are looking to add Swagger/OpenAPI support to a new project you might want to take a look at `drf-spectacular `_, which is an actively maintained new library that shares most of the goals of this project, while working with OpenAPI 3.0 schemas. OpenAPI 3.0 provides a lot more flexibility than 2.0 in the types of API that can be described. ``drf-yasg`` is unlikely to soon, if ever, get support for OpenAPI 3.0. ******** Features ******** - full support for nested Serializers and Schemas - response schemas and descriptions - model definitions compatible with codegen tools - customization hooks at all points in the spec generation process - JSON and YAML format for spec - bundles latest version of `swagger-ui `_ and [redoc] for viewing the generated documentation - schema view is cacheable out of the box - generated Swagger schema can be automatically validated by `swagger-spec-validator `_ - supports Django REST Framework API versioning with URLPathVersioning and NamespaceVersioning; other DRF or custom versioning schemes are not currently supported :alt: GitHub Workflow Status :alt: Codecov :alt: PyPI :alt: Gitter :alt: ReadTheDocs .. |nbsp| unicode:: 0xA0 :trim: drf-extra-fields ================= Integration with `drf-extra-fields `_ has a problem with Base64 fields. The drf-yasg will generate Base64 file or image fields as Readonly and not required. Here is a workaround code for display the Base64 fields correctly. .. code:: python class PDFBase64FileField(Base64FileField): ALLOWED_TYPES = ['pdf'] class Meta: swagger_schema_fields = { 'type': 'string', 'title': 'File Content', 'description': 'Content of the file base64 encoded', 'read_only': False # <-- FIX } def get_file_extension(self, filename, decoded_file): try: PyPDF2.PdfFileReader(io.BytesIO(decoded_file)) except PyPDF2.utils.PdfReadError as e: logger.warning(e) else: return 'pdf' ************ Contributing ************ See https://drf-yasg.readthedocs.io/en/stable/contributing.html for details. This repository adheres to semantic versioning standards. For more information on semantic versioning visit [SemVer]. To keep our process simple we merge pull requests into the master branch we use git tags for releases. We use labels to mark which issues are intended for each version. For example: .. figure:: ./docs/images/flow.png :width: 70% :figwidth: image
Configuration Switches (platform-specific settings discarded)
PY313 OFF Build using Python 3.13 PY314 ON Build using Python 3.14
Package Dependencies by Type
Build (only) python314:dev:std
python-pip:single:v14
autoselect-python:single:std
Build and Runtime python314:primary:std
Runtime (only) python-Django:single:v14
python-djangorestframework:single:v14
python-inflection:single:v14
python-packaging:single:v14
python-pytz:single:v14
python-PyYAML:single:v14
python-uritemplate:single:v14
Download groups
main mirror://PYPIWHL/bb/de/61880040534036044572225c485b0a4adc99b4c92e3eed3e5741b31674fd
Distribution File Information
725ddda28aec7efc4cab985290fe790c8565e665017f7c80211d288a35821c70 4856031 python-src/drf_yasg-1.21.14-py3-none-any.whl
Ports that require python-drf-yasg:v14
python-netbox-app-systems:v14 Application systems plugin for Netbox (3.14)