Skip to main content

bareASGI

A lightweight Python ASGI web server framework (read the docs).

Overview

This is a bare ASGI web server framework. The goal is to provide a minimal implementation, with other facilities (serving static files, CORS, sessions, etc.) being implemented by optional packages.

The framework is targeted at micro-services which require a light footprint (in a container for example), or as a base for larger frameworks.

Python 3.12+ is required.

Optional Packages

Functionality

The framework provides the basic functionality required for developing a web application, including:

  • Http,
  • WebSockets,
  • Routing,
  • Lifecycle,
  • Middleware

Simple Server

Here is a simple server with a request handler that returns some text.

import uvicorn
from bareasgi import Application, HttpRequest, HttpResponse, text_writer

async def example_handler(request: HttpRequest) -> HttpResponse:
    return HttpResponse(
        200,
        [(b'content-type', b'text/plain')],
        text_writer('This is not a test')
    )

app = Application()
app.http_router.add({'GET'}, '/', example_handler)

uvicorn.run(app, port=9009)

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bareasgi-5.0.0.tar.gz (32.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

bareasgi-5.0.0-py3-none-any.whl (41.2 kB view details)

Uploaded Python 3

File details

Details for the file bareasgi-5.0.0.tar.gz.

File metadata

  • Download URL: bareasgi-5.0.0.tar.gz
  • Upload date:
  • Size: 32.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.13

File hashes

Hashes for bareasgi-5.0.0.tar.gz
Algorithm Hash digest
SHA256 e284ce2a05a703dcdcd62fc1b5902b972ee7b917fca730455dd3d1959797cfa5
MD5 6dbef3f5e28c3da116bc3ec68ed2a38f
BLAKE2b-256 e9772552d81bffebc588beaf4c1fbfcc4d32182dc4c19a1168bd447b41ceb177

See more details on using hashes here.

File details

Details for the file bareasgi-5.0.0-py3-none-any.whl.

File metadata

  • Download URL: bareasgi-5.0.0-py3-none-any.whl
  • Upload date:
  • Size: 41.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.13

File hashes

Hashes for bareasgi-5.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4eb2b8e0b52bebe59880288879065e5540b3f81fdb027f11476b9b3c1983fce9
MD5 0edc93864b7b6de8f63b0b301633fcd4
BLAKE2b-256 1d0bbb378d21893140ca4f01194f8c03d610bd41a227f2274447db3756cfb371

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

5.0.0 This release

2 files

4.4.1

2 files

4.4.0

2 files

4.3.0

2 files

4.2.0

2 files

4.1.0

2 files

4.0.1

2 files

4.0.0

2 files

3.7.1

2 files

3.7.0

2 files

3.5.4

2 files

3.5.3

2 files

3.5.2

2 files

3.5.1

2 files

3.5.0

2 files

3.4.2

2 files

3.4.1

2 files

3.4.0

2 files

3.3.0

2 files

3.2.1

2 files

3.2.0

2 files

3.1.0

2 files

3.0.2

2 files

3.0.1

2 files

2.0.2

2 files

2.0.1

2 files

2.0.0

2 files

1.4.0

2 files

1.3.1

2 files

1.3.0

2 files

1.2.0

2 files

1.1.0

2 files

1.0.3

2 files

1.0.1

2 files

1.0.0

2 files

0.3.0

2 files

0.2.4

2 files

0.2.3

2 files

0.2.2

2 files

0.2.1

2 files

0.2.0

2 files

0.1.0

2 files

0.0.1

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page