Skip to main content

A simple asgi web framework

Project description

Fly Framework

Fly 是一个高性能、模块化、易于扩展的 Python Web 框架,旨在提供一个简单而全面的方式来构建 Web 应用程序。它支持同步和异步编程模式,最小化第三方依赖,确保轻量级和高效。

主要特性

  • 模块接口面向对象:服务基于协议,服务提供者注册到核心容器。
  • 路由系统:支持正常、路径参数和正则表达式路由。
  • 中间件:支持类、函数和生成器中间件。
  • 信号:支持内置信号和自定义信号。
  • Schema验证:支持路径、查询、Cookie、头部和正文参数验证。
  • 任务管理:支持后台、延迟和定时任务。
  • 测试:内置测试客户端支持 HTTP、WebSocket 和 SSE。
  • 配置管理:支持字典和 YAML 文件路径输入。
  • OpenAPI支持:自动生成文档和 SDK。
  • 调试工具:提供开发模式、调试壳和状态导出命令。
  • 命令行工具:内置 fly 命令行工具简化开发和部署流程。
  • 视图:支持函数和类基视图。
  • 上下文管理:类似 Flask 的请求和应用上下文。
  • 性能分析:请求性能分析和慢请求日志。

安装

建议使用python3.11及之上的版本进行尝试 目前尚未对其余版本做测试

使用 pip 安装 Fly:

pip install fly-web

快速开始

创建一个简单的应用:

from fly import Fly

app = Fly(__name__)

@app.get("/")
def hello():
    return "Hello, World!"

if __name__ == "__main__":
    app.run()

贡献

欢迎贡献!请阅读我们的贡献指南来了解如何参与改进 Fly。

许可证

Fly 采用 MIT 许可证。详情请参阅 LICENSE 文件。

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fly_web-0.1.0.tar.gz (514.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fly_web-0.1.0-py3-none-any.whl (523.4 kB view details)

Uploaded Python 3

File details

Details for the file fly_web-0.1.0.tar.gz.

File metadata

  • Download URL: fly_web-0.1.0.tar.gz
  • Upload date:
  • Size: 514.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.0 CPython/3.11.4 Darwin/22.6.0

File hashes

Hashes for fly_web-0.1.0.tar.gz
Algorithm Hash digest
SHA256 77a2a1276d03b5997b7bb18297a07c4e917d554faf66ddda735b883d03453604
MD5 65efecda50f8e146773db827ebcca84f
BLAKE2b-256 ede6738a2881ea51e6c9567a6ac5be4585ac16b1d9883eb00ae780eec5cf495b

See more details on using hashes here.

File details

Details for the file fly_web-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: fly_web-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 523.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.0 CPython/3.11.4 Darwin/22.6.0

File hashes

Hashes for fly_web-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0653b00df029322dd9d45a293c8d80647cc30791df6550c963fe9f9ac1991f2b
MD5 bffd946129ee6bcf8e0f954fe57434a0
BLAKE2b-256 ab2732ead3bae9a78153ab53e7af617e89cfd637b302f00ef245d84db2c92bea

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page