teke

A lightweight ASGI framework


Keywords
ASGI
License
MIT
Install
pip install teke==0.0.1

Documentation

Teke

teke logo cropped

Teke is a lightweight ASGI framework that you can use to create fast async REST APIs with Python.

Requirements

Python 3.10+

Installation

$ pip install teke

You'll also want to install an ASGI server, such as uvicorn, daphne, or hypercorn.

$ pip install "uvicorn[standard]"

Example

example.py:

from teke import JsonResponse, Router, create_app

router = Router()

@router.route("/hello/<name>")
async def hello(connection, name):
    return JsonResponse({"hello": name})

app = create_app(routers=[router])

Then run the application using Uvicorn:

$ uvicorn example:app

Run uvicorn with --reload to enable auto-reloading on code changes.

For a more complete example, see exampleshere.

Coming soon:

  • WebSocket support
  • Lifecycle hooks
  • CORS middleware

Dependencies

teke depends on the following python packages:

  • anyio
  • uvloop
  • Werkzeug