qmetrics.net

Django Modern REST

Typed async-friendly REST framework for Django

Django Modern REST screenshot

Adds REST APIs to Django with strict request and response schema validation, async support, and OpenAPI generation. Works with pydantic, msgspec, attrs, and other schema types.

Overview

django-modern-rest is a REST framework for Django that emphasizes type-checked APIs and validation on both sides of each endpoint. It is meant to drop into existing Django projects while adding structured parsing and documentation without replacing Django itself.

Async Django is supported directly without forcing sync-to-async wrappers inside the framework, including compatibility with free-threading builds where tested. Schema models can use pydantic, msgspec, attrs, dataclasses, or TypedDict without locking to one library. Serializers and validators are pluggable rather than tied to a single stack.

Content negotiation includes default handlers for JSON, MessagePack, server-sent events, JSON Lines, and related formats. OpenAPI 3.1 and 3.2 semantic schemas can be generated, with tooling to validate schemas beyond bare generation. The design keeps standard Django primitives, packages, WSGI, and ASGI deployment paths.

Framework parts are intended to be customizable with documented examples. Type checking is exercised under strict mypy, pyright, and related tool configurations in the upstream project.

Key features

  • Async Django API support
  • Pluggable schema libraries
  • Request and response validation
  • OpenAPI 3.1 and 3.2 generation
  • JSON and MessagePack negotiators
  • Strict typing focus
  • Existing Django package compatibility
  • Extensible framework components

Use cases

  • Typed public HTTP APIs
  • Async Django services
  • OpenAPI-documented backends
  • Schema-validated integrations

Tags

Similar software

FastAPI

Python web framework for building APIs with type hints

FastAPI is a Python web framework for building APIs using standard type hints. It builds on Starlette and Pydantic and generates interactive OpenAPI documentation for the endpoints you define.

★ 105.1k⟳ 9 days agoMIT

NestJS

Progressive TypeScript framework for Node.js backends

Nest organizes Node server apps with modules, dependency injection, and first-party packages for auth, data, queues, and observability.

★ 77.2k⟳ todayMIT

OkHttp

HTTP client for JVM, Android, and GraalVM

OkHttp is an HTTP client library tuned for efficient networking on Android, Java, and GraalVM native images. It offers synchronous and asynchronous call APIs with a fluent request builder.

★ 47.1k⟳ yesterdayApache-2.0
Frameworks & PlatformsDesktop/CLI app

gRPC

Cross-language remote procedure call framework

gRPC is an RPC framework that lets client and server programs communicate transparently and supports building connected, multi-language systems.

★ 45.5k⟳ todayApache-2.0

tRPC

End-to-end typesafe TypeScript APIs without code generation

tRPC helps teams define server procedures and call them from clients with full TypeScript types for inputs, outputs, and errors—no schemas or codegen step.

★ 40.9k⟳ todayMIT
Frameworks & PlatformsDesktop/CLI app

go-zero

Cloud-native Go microservices and RPC framework

go-zero is a Go web and RPC framework with code generation, built-in resilience middleware, and tooling aimed at stable high-traffic services.

★ 33.5k⟳ 9 days agoMIT