All Projects → jpadilla → django-rest-framework-yaml

jpadilla / django-rest-framework-yaml

Licence: BSD-3-Clause license
YAML support for Django REST Framework

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to django-rest-framework-yaml

django-firebase-auth
Django DRF authentication provider for Google's Firebase Authentication Service
Stars: ✭ 50 (+85.19%)
Mutual labels:  django-rest-framework
Shappar
気軽に投票を【取れる】【見れる】【できる】アプリです。
Stars: ✭ 22 (-18.52%)
Mutual labels:  django-rest-framework
Face-Recognition-System
Intelligent Facial Recognition with Django Restful IoT on Raspberry Pi
Stars: ✭ 46 (+70.37%)
Mutual labels:  django-rest-framework
rest-framework-latex
A LaTeX renderer for Django REST Framework
Stars: ✭ 30 (+11.11%)
Mutual labels:  django-rest-framework
agent
Job tracker & performance platform
Stars: ✭ 26 (-3.7%)
Mutual labels:  django-rest-framework
django-ninja-extra
Django Ninja Extra - Class-Based Utility and more for Django Ninja(Fast Django REST framework)
Stars: ✭ 53 (+96.3%)
Mutual labels:  django-rest-framework
drf-turbo
An alternative serializer implementation for REST framework written in cython built for speed.
Stars: ✭ 73 (+170.37%)
Mutual labels:  django-rest-framework
GSoC-Data-Analyser
Simple search for organisations participating/participated in the GSoC
Stars: ✭ 29 (+7.41%)
Mutual labels:  django-rest-framework
django-logic
Django Logic - easy way to implement state-based business logic with pure functions
Stars: ✭ 44 (+62.96%)
Mutual labels:  django-rest-framework
django-rest-live
Subscribe to updates from Django REST Framework over Websockets.
Stars: ✭ 48 (+77.78%)
Mutual labels:  django-rest-framework
django-parler-rest
Translatable model support for django-rest-framework
Stars: ✭ 48 (+77.78%)
Mutual labels:  django-rest-framework
tscharts
Django REST framework-based Digital Patient Registration and EMR backend
Stars: ✭ 14 (-48.15%)
Mutual labels:  django-rest-framework
PyQuotes
PyQuotes is a Django-based web application and REST API. That will allow you to launch an online quotes service.
Stars: ✭ 23 (-14.81%)
Mutual labels:  django-rest-framework
django-final
source code for django-final course
Stars: ✭ 28 (+3.7%)
Mutual labels:  django-rest-framework
django-restframework-userprofile
Public Profile is a Django REST Framework based API that demos how to extends a default Django Auth User model with a Profile. In addition, the code also includes a demo client that show how to consume the API from a Client Web Application.
Stars: ✭ 24 (-11.11%)
Mutual labels:  django-rest-framework
open
The most boring open source you've ever seen ....
Stars: ✭ 109 (+303.7%)
Mutual labels:  django-rest-framework
mobileAudit
Django application that performs SAST and Malware Analysis for Android APKs
Stars: ✭ 140 (+418.52%)
Mutual labels:  django-rest-framework
elearning
e-learning django app (django, python)
Stars: ✭ 107 (+296.3%)
Mutual labels:  django-rest-framework
mathesar
Web application providing an intuitive user experience to databases.
Stars: ✭ 95 (+251.85%)
Mutual labels:  django-rest-framework
drf-SimpleJWT-React
Template Django + DRF + SimpleJWT + React project
Stars: ✭ 80 (+196.3%)
Mutual labels:  django-rest-framework

REST Framework YAML

build-status-image pypi-version

YAML support for Django REST Framework

Full documentation for the project is available at http://jpadilla.github.io/django-rest-framework-yaml.

Overview

YAML support extracted as a third party package directly from the official Django REST Framework implementation. It's built using the PyYAML package.

Requirements

  • Python (2.7, 3.3, 3.4)
  • Django (1.6, 1.7)

Installation

Install using pip...

$ pip install djangorestframework-yaml

Example

REST_FRAMEWORK = {
    'DEFAULT_PARSER_CLASSES': (
        'rest_framework_yaml.parsers.YAMLParser',
    ),
    'DEFAULT_RENDERER_CLASSES': (
        'rest_framework_yaml.renderers.YAMLRenderer',
    ),
}

You can also set the renderer and parser used for an individual view, or viewset, using the APIView class based views.

from rest_framework import routers, serializers, viewsets
from rest_framework_yaml.parsers import YAMLParser
from rest_framework_yaml.renderers import YAMLRenderer

# Serializers define the API representation.
class UserSerializer(serializers.HyperlinkedModelSerializer):
    class Meta:
        model = User
        fields = ('url', 'username', 'email', 'is_staff')


# ViewSets define the view behavior.
class UserViewSet(viewsets.ModelViewSet):
    queryset = User.objects.all()
    serializer_class = UserSerializer
    parser_classes = (YAMLParser,)
    renderer_classes = (YAMLRenderer,)

Sample output

---
-
  email: [email protected]
  is_staff: true
  url: "http://127.0.0.1:8000/users/1/"
  username: jpadilla

Documentation & Support

Full documentation for the project is available at http://jpadilla.github.io/django-rest-framework-yaml.

You may also want to follow the author on Twitter.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].