{"id":23617,"library":"djangorestframework-yaml","title":"djangorestframework-yaml","description":"Provides YAML parsing and rendering for Django REST Framework. Current version 2.0.0 supports Python 3.5+, Django 2.2+, and DRF 3.11+. Release cadence is low; last stable release was 2020.","status":"active","version":"2.0.0","language":"python","source_language":"en","source_url":"https://github.com/jpadilla/django-rest-framework-yaml","tags":["django","rest-framework","yaml","serialization"],"install":[{"cmd":"pip install djangorestframework-yaml","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"Core dependency; DRF 3.11+ required.","package":"djangorestframework","optional":false},{"reason":"Required for YAML serialization.","package":"PyYAML","optional":false},{"reason":"Django 2.2+ required.","package":"Django","optional":false}],"imports":[{"wrong":"from rest_framework_yaml.parsers import YAMLParser","symbol":"YAMLParser","correct":"from rest_framework_yaml.parsers import YAMLParser"},{"symbol":"YAMLRenderer","correct":"from rest_framework_yaml.renderers import YAMLRenderer"}],"quickstart":{"code":"from rest_framework import routers, serializers, viewsets\nfrom rest_framework_yaml.renderers import YAMLRenderer\nfrom rest_framework_yaml.parsers import YAMLParser\n\nclass UserSerializer(serializers.Serializer):\n    name = serializers.CharField()\n\nclass UserViewSet(viewsets.ViewSet):\n    serializer_class = UserSerializer\n    renderer_classes = [YAMLRenderer]\n    parser_classes = [YAMLParser]\n\nrouter = routers.DefaultRouter()\nrouter.register(r'users', UserViewSet)\n# Then include router.urls in urlpatterns","lang":"python","description":"Add YAML support to a DRF view by including the parser and renderer classes."},"warnings":[{"fix":"Upgrade to 2.0.0 and ensure Python 3.5+.","message":"Version 2.0.0 drops Python 2 support. Upgrade if still on Python 2.","severity":"breaking","affected_versions":"<2.0.0"},{"fix":"Install using `pip install djangorestframework-yaml`.","message":"The install package name is `djangorestframework-yaml`, not `djangorestframework-yaml` (common typo).","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"search_vec":"'2.0.0':15 '2.2':20 '2020':32 '3.11':23 '3.5':18 'cadenc':25 'current':13 'django':10,19,33 'djangorestframework':2 'djangorestframework-yaml':1 'drf':22 'framework':12,36 'last':28 'low':27 'pars':6 'provid':4 'python':17 'releas':24,30 'render':8 'rest':11,35 'rest-framework':34 'serial':38 'stabl':29 'support':16 'version':14 'yaml':3,5,37","created_at":"2026-05-01T08:08:42.880261+00:00","updated_at":"2026-05-01T08:08:42.880261+00:00","problems":{"verify_error":"Traceback (most recent call last):\n  File \"<string>\", line 1, in <module>\n  File \"/tmp/tmphqpsggfl/venv/lib/python3.12/site-packages/rest_framework_yaml/parsers.py\", line 6, in <module>\n    from django.conf import settings\nModuleNotFoundError: No module named 'django'"},"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":"2.0.0","cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/jpadilla/django-rest-framework-yaml","docs":null,"changelog":null,"pypi":"https://pypi.org/project/djangorestframework-yaml/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["web-framework","serialization"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"import_fail","verified_at":"2026-07-03","last_verified":"2026-07-03","next_check":"2026-07-10","install_tag":null}}