UtilMeta
Weekly Pick
UtilMeta 是一个用于开发 API 服务的 Python 后端元框架,基于类型注解高效构建声明式接口与 ORM 查询,支持自动参数解析、OpenAPI 文档生成,并能与主流 Python 框架集成。
• Copy the embed code to showcase this product on your website
• Share on X to spread the word about this amazing tool
UtilMeta 是一个用于开发 API 服务的 Python 后端元框架,基于类型注解高效构建声明式接口与 ORM 查询,支持自动参数解析、OpenAPI 文档生成,并能与主流 Python 框架集成。
• Copy the embed code to showcase this product on your website
• Share on X to spread the word about this amazing tool
pythonfrom utilmeta.core import api, ormfrom django.db import modelsfrom .models import User, Articleclass UserSchema(orm.Schema[User]): username: str articles_num: int = models.Count('articles')class ArticleSchema(orm.Schema[Article]): id: int author: UserSchema content: strclass ArticleAPI(api.API): async def get(self, id: int) -> ArticleSchema: return await ArticleSchema.ainit(id)
- 截图: