Project Name | Stars | Downloads | Repos Using This | Packages Using This | Most Recent Commit | Total Releases | Latest Release | Open Issues | License | Language |
---|---|---|---|---|---|---|---|---|---|---|
Python 100 Days | 138,537 | a month ago | 689 | Python | ||||||
Python - 100天从新手到大师 | ||||||||||
Django Rest Framework | 26,338 | 24,595 | 1,796 | 3 days ago | 134 | September 22, 2022 | 139 | other | Python | |
Web APIs for Django. 🎸 | ||||||||||
Awesome Django | 7,453 | 13 days ago | 3 | cc0-1.0 | HTML | |||||
A curated list of awesome things related to Django | ||||||||||
Drf Yasg | 3,165 | 290 | 91 | 14 days ago | 62 | July 20, 2023 | 242 | other | Python | |
Automated generation of real Swagger/OpenAPI 2.0 schemas from Django REST Framework code. | ||||||||||
Django Rest Swagger | 2,516 | 2,031 | 43 | 3 years ago | 50 | December 15, 2021 | 168 | bsd-2-clause | Python | |
Swagger Documentation Generator for Django REST Framework: deprecated | ||||||||||
Django Rest Auth | 2,331 | 1,109 | 25 | a year ago | 25 | April 01, 2019 | 234 | mit | Python | |
This app makes it extremely easy to build Django powered SPA's (Single Page App) or Mobile apps exposing all registration and authentication related functionality as CBV's (Class Base View) and REST (JSON) | ||||||||||
Djoser | 2,319 | 212 | 6 | 2 months ago | 50 | October 30, 2020 | 170 | mit | Python | |
REST implementation of Django authentication system. | ||||||||||
Drf Nested Routers | 1,523 | 621 | 35 | 17 days ago | 19 | October 15, 2021 | 49 | apache-2.0 | Python | |
Nested Routers for Django Rest Framework | ||||||||||
Cookiecutter Django Rest | 1,431 | a day ago | 5 | mit | Python | |||||
Build best practiced apis fast with Python3 | ||||||||||
Drf Extensions | 1,371 | 323 | 19 | 4 months ago | 16 | July 30, 2021 | 75 | mit | Python | |
DRF-extensions is a collection of custom extensions for Django REST Framework |
A simple PDF utils for Django Rest Framework
pip install drf-pdf
# coding: utf - 8
from rest_framework import status
from rest_framework.response import Response
from rest_framework.views import APIView
from drf_pdf.renderer import PDFRenderer
from my_pdf_package import PDFGenerator
class PDFHandler(APIView):
renderer_classes = (PDFRenderer, )
def get(self, request):
pdf = PDFGenerator('foo')
headers = {
'Content-Disposition': 'filename="foo.pdf"',
'Content-Length': len(pdf),
}
return Response(
pdf,
headers=headers,
status=status.HTTP_200_OK
)
# coding: utf - 8
from rest_framework import status
from rest_framework.response import Response
from rest_framework.renderers import JSONRenderer
from rest_framework.views import APIView
from drf_pdf.response import PDFResponse
from drf_pdf.renderer import PDFRenderer
from my_pdf_package import get_pdf
class PDFHandler(APIView):
renderer_classes = (PDFRenderer, JSONRenderer)
def get(self, request, pdf_id):
pdf = get_pdf(pdf_id)
if not pdf:
return Response(
{'error': 'Not found'},
status=status.HTTP_404_NOT_FOUND
)
return PDFResponse(
pdf=pdf,
file_name=pdf_id,
status=status.HTTP_200_OK
)