skillfed

djangorestframework-yaml

YAML support for Django REST Framework

djangorestframework-yaml v2.0.0 77.8K downloads/30d#14,493 on PyPI31
Permissive license BSD Abandoned released

What it is and what it does

djangorestframework-yaml is a third-party extension that integrates YAML format support into Django REST Framework. It provides a YAMLParser to deserialize incoming YAML request bodies and a YAMLRenderer to serialize API responses as YAML, built on top of PyYAML. This allows developers to configure their REST APIs to accept and return YAML instead of (or alongside) JSON or other formats.

The package was extracted from Django REST Framework's official codebase as a standalone module. It integrates at the framework level through Django's settings configuration, letting you set YAML as the default parser and renderer globally or per-view. However, the package has been abandoned since April 2020 with no active maintenance, meaning it may not be compatible with recent versions of Django or REST Framework.

Use it for:

  • Serve legacy clients or systems that expect YAML-formatted API responses instead of JSON.
  • Build internal tools or microservices where YAML is preferred for human readability in request/response bodies.
  • Support bidirectional YAML serialization in REST APIs for teams already using YAML in their infrastructure.
  • Migrate from older Django REST Framework versions that had built-in YAML support before it was extracted.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Adds YAML parsing and rendering support to Django REST Framework, allowing APIs to accept and return YAML-formatted data alongside the framework's standard formats.

No, unless you are locked to an older Django and REST Framework stack. The package is abandoned (last release 2020-04-27, no commits since), making it a liability for any modern Django project. If you need YAML support in a current REST Framework setup, investigate maintained alternatives or implement a custom parser/renderer instead of adopting unmaintained code.

Install

djangorestframework-yaml on PyPI

pip

pip install djangorestframework-yaml

uv

uv add djangorestframework-yaml

poetry

poetry add djangorestframework-yaml

Installing djangorestframework-yaml

Before you install

Low install friction with a single runtime dependency (PyYAML). However, the package is abandoned—last release was 2020-04-27, over 2300 days ago, with no recent commits. Use only if your Django and REST Framework versions are locked to older releases or if you can maintain a fork.

License in practice

BSD license is permissive, imposing no restrictions on commercial or private use. You may use, modify, and distribute this package freely as long as you include the original license notice.

Quickstart

pip install djangorestframework-yaml

# In Django settings.py:
REST_FRAMEWORK = {
    'DEFAULT_PARSER_CLASSES': (
        'rest_framework_yaml.parsers.YAMLParser',
    ),
    'DEFAULT_RENDERER_CLASSES': (
        'rest_framework_yaml.renderers.YAMLRenderer',
    ),
}

Requires Django and Django REST Framework to be installed separately; package is abandoned and may not work with current versions of either framework.

Verify before relying

  • Compatibility with Django versions released after 2020-04-27 and current REST Framework releases.
  • Whether PyYAML security updates are sufficient for production use given the package's abandonment.
  • Active community forks or maintained alternatives for YAML support in modern Django REST Framework.

Package facts

License BSD (permissive)
Python support supports the current Python release (>=3.5)
Install friction low — pure-Python wheel
Runtime dependencies 1 — PyYAML
Maintenance abandoned — 2,300 days since the last release
Last repo commit
First released
Downloads 77,801/month — #14,493 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: djangorestframework_yaml-2.0.0-py2.py3-none-any.whl

Development Status :: 5 - Production/StableEnvironment :: Web EnvironmentFramework :: DjangoIntended Audience :: DevelopersLicense :: OSI Approved :: BSD LicenseNatural Language :: EnglishOperating System :: OS IndependentProgramming Language :: Python :: 3Programming Language :: Python :: 3.5Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Topic :: Internet :: WWW/HTTP

Tags

django rest framework yamlyaml parser django restyaml renderer drfdjango api yaml supportrest framework yaml serialization
django-rest-frameworkyaml-serializationabandoned

More WWW/HTTP packages