Skip to content

mrkiura/teke

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Lightweight ASGI python framework

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages