An easy-to-use asynchronous web framework based on ASGI.
Project description
Index.py 实现了 ASGI3 接口,并使用 Radix Tree 进行路由查找。是最快的 Python web 框架之一。一切特性都服务于快速开发高性能的 Web 服务。
- 灵活且高效的路由系统 (基于 Radix Tree)
- 自动解析请求 & 生成文档 (基于
pydantic) - 可视化 API 接口 (基于
ReDoc, 针对中文字体优化) - 非常简单的部署 (基于
uvicorn与gunicorn) - 挂载 ASGI/WSGI 应用 (基于 a2wsgi)
- 进程内后台任务 (基于
asyncio) - 可使用任何可用的 ASGI 生态
Install
pip install -U index.py
或者直接从 Github 上安装最新版本(不稳定)
pip install -U git+https://github.com/abersheeran/index.py@setup.py
Quick start
向一个 .py 文件写入如下代码并直接执行它,访问 http://127.0.0.1:4190。
from indexpy import Index
app = Index()
@app.router.http("/", method="get")
async def homepage(request):
return "hello, index.py"
if __name__ == "__main__":
import uvicorn
uvicorn.run(app, interface="asgi3", port=4190)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
index.py-0.12.8.tar.gz
(35.7 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
index.py-0.12.8-py3-none-any.whl
(43.4 kB
view details)
File details
Details for the file index.py-0.12.8.tar.gz.
File metadata
- Download URL: index.py-0.12.8.tar.gz
- Upload date:
- Size: 35.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.0.10 CPython/3.7.9 Linux/5.4.0-1023-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bbacfd8a7204eba314f985dc4ee58a187356da202f1a81afde073f75209f5610
|
|
| MD5 |
11eadfeaf600d70daa62ff2a870d672a
|
|
| BLAKE2b-256 |
6395f8bc6aadd790a28d6c26b47747e3ad5d77041944e05e145b052874e88fb8
|
File details
Details for the file index.py-0.12.8-py3-none-any.whl.
File metadata
- Download URL: index.py-0.12.8-py3-none-any.whl
- Upload date:
- Size: 43.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.0.10 CPython/3.7.9 Linux/5.4.0-1023-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
be5a080d2c14cbd699392eff131e7f53231c02cac03658336c609a9d2c74bab9
|
|
| MD5 |
7e4c77494425b3cb9bc1d52af451ed91
|
|
| BLAKE2b-256 |
4726f7d90c1c465c072ac68366d9f9172aba37ac2a44d7257743e42b74916345
|