Registry / web-framework / django-rest-swagger

django-rest-swagger

JSON →
library2.2.0pypypiunverified

django-rest-swagger provides Swagger UI integration for Django REST Framework (DRF) 3.5+. The project is currently at version 2.2.0, released in 2017, and is in maintenance mode. New projects are strongly advised to use modern alternatives like drf-yasg or drf-spectacular for OpenAPI/Swagger documentation.

pip install django-rest-swagger
INSTALL
IMPORT
SIG · DJANGO-REST-SWAGGE
D
django-rest-swagger
web-frameworkpythonv2.2.0
Install
6.5s avg
Import
Disk
79MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v2.2.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.920 runs
installs and imports cleanly · install 0.0s · import 0.000s · 79.8MB
glibc
py 3.103.920 runs
installs and imports cleanly · install 6.5s · import 0.000s · 80MB
79MB installed
● package 79MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

get_swagger_view
from rest_framework_swagger.views import get_swagger_view
from rest_framework_swagger.views import get_swagger_view

Add 'rest_framework_swagger' to INSTALLED_APPS in settings.py and include the swagger URL pattern in your project's urls.py. The get_swagger_view function creates a view for the Swagger UI.

# settings.py INSTALLED_APPS = [ # ... 'rest_framework', 'rest_framework_swagger', ] # urls.py from django.urls import re_path from rest_framework_swagger.views import get_swagger_view # Replace 'My API' with your project's title schema_view = get_swagger_view(title='My API') urlpatterns = [ # ... other url patterns re_path(r'^swagger/$', schema_view) ]
Debug
Known issues
deprecatedThe `django-rest-swagger` library is deprecated and is in maintenance mode, receiving only critical bug fixes. It's built against older DRF versions and Swagger UI v3.13.6, making it unsuitable for modern projects.
fix
For new projects or existing projects needing active development/modern features, migrate to `drf-yasg` or `drf-spectacular` which provide OpenAPI 3.0+ support and are actively maintained.
affects: 2.x and earlier
breakingVersion 2.0.0 introduced significant breaking changes, shifting from introspection/YAML overrides to CoreAPI and renderer classes for schema generation, and requiring Django REST Framework 3.4+.
fix
Review the 2.0.0 release notes for `django-rest-swagger` and update code to use CoreAPI schema generation and renderer classes. Ensure `djangorestframework` is at least 3.4.
affects: Before 2.0.0 to 2.0.0+
breakingVersion 2.1.0 increased the minimum required Django REST Framework version to 3.5.1.
fix
Upgrade `djangorestframework` to at least 3.5.1 to ensure compatibility with `django-rest-swagger` 2.1.0 and later.
affects: Before 2.1.0 to 2.1.0+
gotchaAuthentication support, especially for non-session APIs (e.g., Token or JWT authentication), might be limited or require custom workarounds due to the older Swagger UI version and bootstrap client architecture.
fix
Consult the `django-rest-swagger` GitHub issues for community-contributed workarounds or consider migrating to more actively developed alternatives with better, out-of-the-box authentication support.
affects: 2.x
Upgrade
Version history
2.2.0latest on PyPI · released Apr 30, 2018
Audit
Dependencies
djangorestframeworkrequiredRequired for core functionality; minimum version 3.5.1
DjangorequiredRequired for Django projects; minimum version not explicitly stated but compatible with DRF 3.5.1 generally means Django 1.8-2.x.
Agent activity
21 hits · last 30 days
node
20
Resources
django-rest-swagger — pip install django-rest-swagger · libregistry