Skip to content

Latest commit

 

History

History
86 lines (61 loc) · 2.77 KB

README-en.md

File metadata and controls

86 lines (61 loc) · 2.77 KB

中文 | English

Github Action Test OnPush

Publish PyPi PyPI Downloads

PyPI - Python Version

An easy-to-use high-performance asynchronous web framework.

Index.py Documentation


Index.py implements the ASGI3 interface and uses Radix Tree for route lookup. Is one of the fastest Python web frameworks. All features serve the rapid development of high-performance Web services.

  • Flexible and efficient routing system (based on Radix Tree)
  • Automatically parse requests & generate documents (based on pydantic)
  • Visual API interface (based on ReDoc, optimized for fonts)
  • Built-in deployment commands (based on uvicorn and gunicorn)
  • Mount ASGI/WSGI applications
  • Background tasks in process (based on asyncio)
  • Any available ASGI ecosystem can be used

Install

pip install -U index.py

or install the latest version from Github (unstable).

pip install -U git+https://github.com/abersheeran/index.py@setup.py

Quick start

Write the following code to the main.py file, use pip install index.py uvicorn to install uvicorn and index.py, and then execute index-cli uvicorn main:app to start an efficient Web service now.

from indexpy import Index
from indexpy.routing import HttpRoute


async def homepage(request):
    return "hello, index.py"


app = Index(
    routes=[
        HttpRoute("/", homepage, method="get"),
    ]
)