Skip to main content

Django REST Framework + Swagger

Project description

# DRF Swagger
#### Code Based API document builder

# Overview
- Django Rest Framework (DRF)
- Code Based (Serializer to Docs)
- Swagger UI (

# Example
from django.http import HttpResponse
from django.contrib.auth.models import User
from rest_framework import viewsets, serializers
from drf_swagger import drf_request, drf_response

class ViewSetTest(viewsets.ViewSet):
lookup_field = 'view_set'

def update(self, request, view_set):
summary: test summary
- name: test_param
in: query
type: string
description: Only 'name, in, type' is required
example: test example
required: true
return HttpResponse("!@3123")

class RootSerializer(serializers.ModelSerializer):
id = serializers.CharField(
help_text='user pk: 46887',
class Meta:
model = User
fields = (

# Install

# Quick Start

# Warning
- For security, override SwaggerView and add login
- Will Make login/security setting someday...


Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for pip-test-swagger, version 0.1.3
Filename, size File type Python version Upload date Hashes
Filename, size pip_test_swagger-0.1.3.tar.gz (4.1 MB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page