flama
v1.9.5
Flama是一个Python库,它为API的开发和部署建立了标准的框架,并特别关注机器学习(ML)。该框架的主要目的是使ML API的部署变得非常简单,将整个过程简化为一行代码。
该图书馆建立在《星条》上,并提供了一种易于学习的理念,可以加快构建高性能的GraphQL,REST和ML API。此外,它为开发异步和生产就绪服务的开发提供了理想的解决方案,并为ML模型提供了自动部署。
一些显着特征:
Component s。诸如Request , Response , Session之类的Flama Asgi对象定义为准备在您的端点中注入的Component 。Component s作为插件生态系统的基础,允许您创建自定义或使用端点中定义的插件,并注入了参数。docs ,并提供Swagger UI和REDOC端点。limit-offset和page numbering等。 Flama与所有受支持的Python完全兼容。我们建议您使用可用的最新版本。
有关如何安装Flama访问的详细说明:https://flama.dev/docs/getting-started/installation。
请访问https://flama.dev/docs/getting-started/quickstart,开始使用Flama。
请访问https://flama.dev/docs/查看完整文档。
from flama import Flama
app = Flama (
title = "Hello-" ,
version = "1.0" ,
description = "My first API" ,
)
@ app . route ( "/" )
def home ():
"""
tags:
- Salute
summary:
Returns a warming message
description:
This is a more detailed description of the method itself.
Here we can give all the details required and they will appear
automatically in the auto-generated docs.
responses:
200:
description: Warming hello message!
"""
return { "message" : "Hello " }此示例将构建并运行Hello API。运行它:
flama run examples.hello_flama:app
该项目绝对可以接受贡献,因此,如果您有一个好主意,请在提交拉动请求之前阅读我们的贡献文档。