Skip to main content

A really thin ASGI web framework

Project description

Asgineer

A really thin ASGI web framework 🐍🤘

Build Status Documentation Status Package Version

Introduction

Asgineer is a tool to write asynchronous web applications, using as few abstractions as possible, while still offering a friendly API. The guide and reference take just a few minutes to read!

When running Asgineer on Uvicorn, it is one of the fastest web frameworks available. It supports http long polling, server side events (SSE), and websockets. And has utilities to serve assets the right (and fast) way.

Asgineer is proudly used to serve e.g. https://pyzo.org and https://timetagger.app.

Example

# example.py

import asgineer

@asgineer.to_asgi
async def main(request):
    return f"<html>You requested <b>{request.path}</b></html>"

if __name__ == '__main__':
    asgineer.run(main, 'uvicorn', 'localhost:8080')

You can start the server by running this script, or start it the ASGI way, e.g. with Uvicorn:

$ uvicorn example:main --host=localhost --port=8080

Installation and dependencies

Asgineer needs Python 3.8 or higher (may work on older versions but is not tested). To install or upgrade, run:

$ pip install -U asgineer

Asgineer has zero hard dependencies, but it needs an ASGI server to run on, like Uvicorn, Hypercorn, or Daphne.

Development

Install with pip install -e .[dev].

Run invoke -l to get a list of dev commands, e.g.:

  • invoke autoformat to apply Black code formatting.
  • invoke lint to test for unused imports and more.
  • invoke tests to run the tests, optionally set the ASGI_SERVER environment variable.

License

BSD 2-clause.

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

asgineer-0.8.3.tar.gz (42.8 kB view details)

Uploaded Source

Built Distribution

asgineer-0.8.3-py3-none-any.whl (21.3 kB view details)

Uploaded Python 3

File details

Details for the file asgineer-0.8.3.tar.gz.

File metadata

  • Download URL: asgineer-0.8.3.tar.gz
  • Upload date:
  • Size: 42.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.32.3

File hashes

Hashes for asgineer-0.8.3.tar.gz
Algorithm Hash digest
SHA256 dc2e7467a334cf609f710adf0bed2c422845174548da8c9a914af98298155d8b
MD5 36ca0d59bf9d1412112dc978a4a7bf15
BLAKE2b-256 7e462ad840216f2c2e22d5e0a94545f61c99c310aefb2138af83ee874b0c357c

See more details on using hashes here.

Provenance

File details

Details for the file asgineer-0.8.3-py3-none-any.whl.

File metadata

  • Download URL: asgineer-0.8.3-py3-none-any.whl
  • Upload date:
  • Size: 21.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.32.3

File hashes

Hashes for asgineer-0.8.3-py3-none-any.whl
Algorithm Hash digest
SHA256 334e3f9b87f543805dfe618841878475896f5bf2f96a3cbf4015fa04604dfd4c
MD5 c6360ea5ce8145d93bff868368c3d471
BLAKE2b-256 056695c84f4afd21e4ae25950f99380223b17b744e1a92a44c1995737ee1f4b8

See more details on using hashes here.

Provenance

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