惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

U
Unit 42
Blog — PlanetScale
Blog — PlanetScale
H
Help Net Security
The GitHub Blog
The GitHub Blog
博客园 - Franky
酷 壳 – CoolShell
酷 壳 – CoolShell
Recent Announcements
Recent Announcements
量子位
aimingoo的专栏
aimingoo的专栏
大猫的无限游戏
大猫的无限游戏
博客园 - 叶小钗
Microsoft Azure Blog
Microsoft Azure Blog
Martin Fowler
Martin Fowler
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
A
About on SuperTechFans
T
Tailwind CSS Blog
V
V2EX
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
B
Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
S
SegmentFault 最新的问题
G
Google Developers Blog
M
MIT News - Artificial intelligence

Hacker News: Show HN

PurrrrrFocus: Pomodoro Timer App - App Store Workflow Engine — Multi-Step Orchestration for Bun RapidPhoto: Pro Photo Editor App - App Store GitHub - DheerG/swarms: Achieve extraordinary results with claude code across a variety of tasks SPICE simulation → oscilloscope → verification with Claude Code — Lucas Gerads Show HN: VCoding – A 5 MB native Windows IDE with no dynamic dependencies Show HN: LLMs don't hallucinate because they're bad at math, it's the format GitHub - Agent-FM/agentfm-core: AgentFM is a peer-to-peer network that turns everyday computers into a decentralized AI supercomputer. AgentFM lets you run massive AI workloads directly across a global mesh of idle CPUs and GPUs. Show HN: Tracking Top US Science Olympiad Alumni over Last 25 Years GitHub - Potarix/agent-hub: One place to talk to all your agents Show HN: Runtime security for AI agents(injection,tool abuse, data exfiltration) GitHub - dubeyKartikay/lazyspotify: Terminal Spotify client for macOS and Linux GitHub - the-banana-tool/king-louie: Easy to use GUI Personal AI Assistant. Win/Linux/Mac. Show HN I made my vacation rental bookable by AI agents–no Airbnb, 0% commission GitHub - basteez/jsf-autoreload: maven plugin to enable hot reload on jsf projects uvm32/hosts/host-gdbstub at main · ringtailsoftware/uvm32 GitHub - labsai/EDDI: Config-driven engine that turns JSON into production-grade AI agents. Multi-agent orchestration, 12+ LLM providers, MCP/A2A protocols, RAG, persistent memory, and enterprise compliance (EU AI Act, GDPR, HIPAA). Built on Quarkus. GitHub - glitchnsec/fortyone-oss: AI Executive Assistant Platform Quickstart | Alien GitHub - muxshed/shed: One stream in, or many. Every destination, simultaneously. No cloud middleman, no per-channel fees, no limits. GitHub - ocrbase-hq/ocrbase: 📄 PDF/IMG ->.MD/JSON Document OCR API for PaddleOCR and GLMOCR. Self-hostable. GitHub - impactjo/home-memory: MCP server that lets your AI assistant remember everything about your home. GitHub - Sets88/dbcls: DbCls is a powerful terminal database client that supports various databases GitHub - neptun2000/heor-agent-mcp GitHub - SeanFDZ/macmind: Single-layer transformer in HyperTalk for the classic Macintosh RollQuation: Math Puzzles - Apps on Google Play GitHub - dropbox/witchcraft Show HN: Agent-cache – Multi-tier LLM/tool/session caching for Valkey and Redis GitHub - opentalon/opentalon: OpenTalon is an open-source platform built from the ground up in Go as a robust alternative to OpenClaw LinkedIn™ 职位抓取工具 - Chrome 应用商店
GitHub - wemake-services/django-modern-rest: Modern REST ...
sobolevn · 2026-04-29 · via Hacker News: Show HN

Modern REST Logo - Light

Modern REST framework for Django with types and async support!

wemake.services Modern REST test codecov No AI slop inside PyPI Downloads Python Version wemake-python-styleguide Ask DeepWiki Telegram chat

Features

  • Blazingly fast
  • Supports django>=4.2
  • 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
  • Supports content negotiation, has default implementations for json, msgpack, SSE, Json Lines, and more
  • Strict schema validation of both requests and responses, including errors
  • Supports OpenAPI 3.1 / 3.2 semantic schema generation out of the box
  • Supports all your existing django primitives and packages, no custom runtimes
  • Great testing tools with schemathesis, polyfactory, tracecov, 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
  • Built by the community for the community, not a single-person project
  • Great docs
  • No AI slop, but built for the LLM era
  • No emojis 🌚️️

Benchmark - Light

Sync mode

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

I rarely see frameworks that treat their OpenAPI schema as a first-class citizen. django-modern-rest not only generates a schema that accurately reflects your code, but also gives you the tools to verify it.

Dmitry Dygalo, author of Schemathesis

Installation

Works for:

  • CPython 3.11+ or PyPy 3.11+
  • Django 4.2+
pip install django-modern-rest

There are several included extras:

  • 'django-modern-rest[msgspec]' provides msgspec support and the fastest json parsing, recommended to be always included
  • 'django-modern-rest[pydantic]' provides pydantic support
  • 'django-modern-rest[attrs]' provides attrs support
  • 'django-modern-rest[jwt]' provides pyjwt auth support
  • 'django-modern-rest[openapi]' provides OpenAPI schema validation, yaml OpenAPI view, and generates better OpenAPI examples with polyfactory

Example

The shortest example (click here to copy the whole file):

>>> 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,
...         )

And then route this controller in your urls.py:

>>> from django.urls import include, path
>>> from dmr.routing import Router

>>> router = Router(
...     'api/',
...     [
...         path('user/', UserController.as_view(), name='users'),
...     ],
... )
>>> urlpatterns = [
...     path(router.prefix, include((router.urls, 'my_app'), namespace='api')),
... ]

Done! Now you have your shiny API with 100% type safe validation and interactive docs.

Next steps:

License

MIT

Credits

This project was generated with wemake-python-package. Current template version is: e1fcf312d7f715323dcff0d376a40b7e3b47f9b7. See what is updated since then.