Skip to main content

Toolkit for building ASGI applications and libraries

Project description

Asgikit - ASGI Toolkit

Asgikit is a toolkit for building asgi applications and frameworks.

It is intended to be a minimal library and provide the building blocks for other libraries.

Features:

  • Request
    • Headers
    • Cookies
    • Body (bytes, str, json)
    • Form
      • url encoded
      • multipart
  • Response
    • Plain text
    • Json
    • Streaming
    • File
  • Websockets

Example

from asgikit.requests import HttpRequest
from asgikit.responses import JsonResponse

async def main(scope, receive, send):
    request = HttpRequest(scope, receive, send)
    body = await request.json()
    data = {"lang": "Python", "async": True}
    response = JsonResponse(content=data)
    await response(scope, receive, send)

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

asgikit-0.1.0.tar.gz (10.7 kB view hashes)

Uploaded Source

Built Distribution

asgikit-0.1.0-py3-none-any.whl (13.6 kB view hashes)

Uploaded Python 3

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