_images/logo-light.svg
_images/logo-dark.svg

Modern REST framework for Django with types and async support!

This guide will walk you through all the details of how to install, use, and extend django-modern-rest framework.

Testimonials

The one thing I really love about django-modern-rest is its pluggable
serializers and validators. Frameworks that are tightly coupled
with pydantic can be really painful to work with.

Kirill Podoprigora, CPython core developer

Using django-modern-rest has been a game-changer
for my productivity. The strict type safety and schema validation
for both requests and responses mean I spend less time debugging
and more time building.

Josiah Kaviani, Django core developer

Main features include:

REST

Semantic REST APIs with 100% typed API and strict schema validation for both requests and responses.

You would never miss an important status code in the docs anymore!

Core concepts
Blazingly Fast!

Built with performance in mind. Import time optimizations, only one validation per request, best json parsing tools in class.

And msgspec support allows users to have x5-15 times faster APIs than the alternatives.

Performance and Benchmarks
Sync and Async support

Fully utilizes best of the both worlds in django.

Create your APIs as sync or async, your choice. Both wsgi and asgi are supported.

Core concepts
Not just schema generation

Of course, OpenAPI schema generation and modification are available out of the box.

But, there’s more: we also provide validation and testing tools for your schema! Powered by schemathesis

OpenAPI
Still good old Django

We don’t reinvent the wheel, this is just good old Django. We only add fast json parsing and schema for requests and responses.

And that’s it. You can still use all packages and features from regular Django apps. No new concepts to learn, no new APIs to be compatible with.

Just drop this package into any existing Django application!

Core concepts
Customizable to the core

Every part of the framework can be customized and extended.

Since, there’s no magic happening, it would be really easy to do. Our docs and tests provide multiple examples of that.

Public API stability is guaranteed from 1.0.0 release.

Public API

Contributors

Here are our amazing people who made this project possible.