Skip to main content

A lightweight ASGI framework

Project description

Teke

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

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

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

teke-0.0.1.tar.gz (6.5 kB view details)

Uploaded Source

Built Distribution

teke-0.0.1-py3-none-any.whl (6.8 kB view details)

Uploaded Python 3

File details

Details for the file teke-0.0.1.tar.gz.

File metadata

  • Download URL: teke-0.0.1.tar.gz
  • Upload date:
  • Size: 6.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.23.0

File hashes

Hashes for teke-0.0.1.tar.gz
Algorithm Hash digest
SHA256 e6c9ed89a640f8130656e9800607f47679e57e263c3e4303cbfa37dbcac5eb65
MD5 29b8d1c2ed19084f0d48ba4d0122ab2f
BLAKE2b-256 c8a223a9c982a525f2a59b93641f81c6330ef0aa21ec97c9c0a916cbaaca829b

See more details on using hashes here.

File details

Details for the file teke-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: teke-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 6.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.23.0

File hashes

Hashes for teke-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 52a690dc6d44b66537d6bfa3bbbc809516943bca720f3afe383a032cd7a01ac6
MD5 dfde4a08632faebbe39dbcf4dffd432b
BLAKE2b-256 68a5c328b339a37eb826dd91b5bb7019c6c103ea98d27b5fcccbcb234298735a

See more details on using hashes here.

Supported by

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