# django-modern-rest: Modern REST framework for Django with types and async support!

**URL:** https://forum.djangoproject.com/t/django-modern-rest-modern-rest-framework-for-django-with-types-and-async-support/44919
**Category:** Show & Tell
**Created:** [April 15, 2026, 3:02pm UTC](https://forum.djangoproject.com/t/django-modern-rest-modern-rest-framework-for-django-with-types-and-async-support/44919 "2026-04-15T15:02:51Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![sobolevn](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/sobolevn/32/173_2.png) [@sobolevn](https://forum.djangoproject.com/u/sobolevn)
#### Post date: [April 15, 2026, 3:02pm UTC](https://forum.djangoproject.com/t/django-modern-rest-modern-rest-framework-for-django-with-types-and-async-support/44919/1 "2026-04-15T15:02:51Z")

</div>

Hi! 👋  
Some people might know me because of my CPython core development work, `django-stubs` maintaince, or even by [wemake-django-template](https://github.com/wemake-services/wemake-django-template/).

## django-modern-rest

Repo: [GitHub - wemake-services/django-modern-rest: Modern REST framework for Django with types and async support! · GitHub](https://github.com/wemake-services/django-modern-rest/)

Docs: [https://django-modern-rest.rtfd.io/](https://django-modern-rest.rtfd.io/)

I want to present my latest project to Django community. I made a really simple, yet powerful REST framework for Django. Here’s a quick example:

```python
import uuid
import pydantic
from dmr import Body, Controller, Headers
# Or use `dmr.plugins.msgspec` or write your own!
from dmr.plugins.pydantic import PydanticFastSerializer

class UserCreateModel(pydantic.BaseModel):
    email: str

class UserModel(UserCreateModel):
    uid: uuid.UUID
    consumer: str

class HeaderModel(pydantic.BaseModel):
    consumer: str = pydantic.Field(alias='X-API-Consumer')

class UserController(Controller[PydanticFastSerializer]):
    async def post( # <- can be sync as well!
        self,
        parsed_body: Body[UserCreateModel],
        parsed_headers: Headers[HeaderModel],
    ) -> UserModel:
        """All added props have the correct runtime and static types."""
        return UserModel(
            uid=uuid.uuid4(),
            email=parsed_body.email,
            consumer=parsed_headers.consumer,
        )

```

Here are some interesting features:

- [Blazingly fast](https://django-modern-rest.readthedocs.io/en/latest/pages/deep-dive/performance.html)
- Supports `django>=4.2`, CPython 3.11+ and PyPy 3.11+
- Supports `pydantic2`, `msgspec`, `attrs`, `dataclasses`, `TypedDict` as model schemas, but not bound to any of these libraries
- Supports async Django without any `sync_to_async` calls inside, tested to work with free-threading builds
- Fully typed and checked with `mypy`, `pyright`, and `pyrefly` in strict modes
- Uses default [Django routing system](https://django-modern-rest.readthedocs.io/en/latest/pages/routing.html), but speeds up all `path()` calls from 30% to x50 times
- Supports [content negotiation](https://django-modern-rest.readthedocs.io/en/latest/pages/negotiation.html), has default implementations for `json` and `msgpack`
- Supports [streaming](https://django-modern-rest.readthedocs.io/en/latest/pages/streaming/common.html): SSE and JsonLines
- Supports Django session auth and JWT auth [out of the box](https://django-modern-rest.readthedocs.io/en/latest/pages/auth/common.html)
- Supports flexible [throttling](https://django-modern-rest.readthedocs.io/en/latest/pages/throttling.html) rules
- Strict schema validation of both requests and responses, including errors
- Supports OpenAPI 3.1 / 3.2 [semantic schema generation](https://django-modern-rest.readthedocs.io/en/latest/pages/openapi/schema.html)
- Swagger UI, Redoc, Scalar, Stoplight Elements, `openapi.json`, `openapi.yaml` views [supported by default](https://django-modern-rest.readthedocs.io/en/latest/pages/openapi/openapi.html)
- Supports all your existing `django` primitives and packages, [supports wrapping any existing Django middleware](https://django-modern-rest.readthedocs.io/en/latest/pages/middleware.html), no custom runtimes
- Easy to write plugins for and [sharing reusable code](https://django-modern-rest.readthedocs.io/en/latest/pages/reusable-code.html)
- Great testing tools with [schemathesis](https://github.com/schemathesis/schemathesis), [polyfactory](https://github.com/litestar-org/polyfactory), bundled `pytest` plugin, and default Django’s testing primitives
- 100% test coverage with 2000+ of carefully designed unit, integration, and property-based tests
- High [security standards](https://github.com/wemake-services/django-modern-rest/blob/master/.github/SECURITY.md)
- Built [by the community](https://github.com/wemake-services/django-modern-rest/graphs/contributors) for the community, not a single-person project
- Great [docs](https://django-modern-rest.readthedocs.io/en/latest)
- No AI slop, but [built for the LLM era](https://django-modern-rest.readthedocs.io/en/latest/pages/getting-started.html#llms-support) with curated skills, contexts, LLMs integrations

For example, we offer [official `$dmr` skill](https://github.com/wemake-services/django-modern-rest/tree/master/.agents/skills) to write code using all our best-practices with agents. We also offer skills to create new `django-modern-rest` projects from `OpenAPI` schema file or skills for converting existing `django-ninja` or `django-rest-framework` code base to `django-modern-rest`. Migrating has never been easier 😉  
We also care about providing good context with `llms-full.txt` and `context7.json`.

As a fun fact, we [compile parts of the framework](https://github.com/wemake-services/django-modern-rest/tree/master/dmr/_compiled) with `mypyc` for some extra speed. Basically, using type-annotated Python code allows us to get some free performance with the pre-built wheels and pure python wheels for all platforms.

It also has integrations with tracecov API coverage tool, which allows you to see what API routes / responses / schemas you have really tested in your test cases:

 ![telegram-cloud-photo-size-2-5355296934027007902-y](https://us1.discourse-cdn.com/flex026/uploads/djangoproject/original/3X/f/a/fa99a60cb3d4c1076fc75b2bad04cdf45deb4984.jpeg)

Project just released `0.7.0` version, it is still in its early stages, but I invite you to [check it out and star ⭐ it on GitHub if you like it](https://github.com/wemake-services/django-modern-rest)!
