django-modern-rest@0.16.0 release
0 points by sobolevn
0 points by sobolevn
Hi everyone, I am the release manager of django-modern-rest :)
django-modern-rest 0.16.0 is out!
Is this your first time that you hear about this project? django-modern-rest is a fully typed / fast / flexible / async-ready framework to create REST APIs for Django. It supports Pydantic, msgspec, attrs and many other models.
Here's how the code looks like:
import uuid
import pydantic
from dmr import Body, Controller
from dmr.plugins.pydantic import PydanticFastSerializer
class UserCreateModel(pydantic.BaseModel):
email: str
class UserModel(UserCreateModel):
uid: uuid.UUID
class UserController(Controller[PydanticFastSerializer]):
def post(self, parsed_body: Body[UserCreateModel]) -> UserModel:
return UserModel(uid=uuid.uuid4(), email=parsed_body.email)
Other notable features:
Builtin auth with sessions / JWT headers and cookies
Validation of requests and responses according to the OpenAPI spec in debug mode, the spec is the source of truth
Builtin content negotiation, supporting conditional request and response models for different content types
Flexible error handling
Optional error model negotiation and complete customization
Streaming of SSE and JsonLines
Code reuse is the first-class citizen, create your own typed abstractions and use them with ease and safety
Advanced testing strategies, including OpenAPI coverage testing and property based tests with the help of schemathesis
AI as the first-class feature: skills, contexts, mcps, etc. But, no slop inside.
Now, back to the 0.16.0 release!
Built during opensource_september community event with 32 contributors and 144 commits. This is our fastest release ever.
extras= for your own typed @modify / @validate parametersSettings are no longer merged across levels. Endpoint overrides controller, controller overrides settings. Explicit [] or None disables, EMPTY falls through. Merge explicitly when you want it: @modify(auth=[*auth, other]).
Agent skills now ship inside the package: uvx library-skills installs the ones matching your version. The new $dmr-upgrade skill carries the migration prompts, so ask your coding agent to upgrade you from 0.15.0. Every docs page is also served as Markdown.
Our AI policy is to allow AI-generated code, but only after several rounds of my manual review. My own AI usage is limited to docs, changelogs, some tests for corner cases.
Nothing too crazy.
But, we develop a lot of AI tooling for end users: skills / MCPs / evals / contexts / etc. That's why these ignores are needed :)