Skip to main content

logo logo text

Lines of code GitHub issues GitHub top language GitHub Workflow Status GitHub GitHub issues GitHub forks GitHub stars GitHub license Twitter PyPI - Implementation PyPI - Python Version PyPI - Wheel PyPI PyPI - License PyPI - Downloads PyPI - Format PyPI - Status Downloads

NanoASGI: Asynchronous Python Web Framework

NanoASGI is a fast:zap:, simple and light:bulb:weight ASGI micro:microscope: web:earth_asia:-framework for Python:snake:. It is distributed as a single file module and has no dependencies other than the Python Standard Library.

Download and Install

Download :arrow_down: nanoasgi.py into your project directory. There are no hard dependencies other than the Python standard library. NanoASGI runs with Python versions above 3.7.

Example

# example.py
from nanoasgi import App, Response


app = App()


@app.on('startup')
async def on_startup():
    print('Ready to serve requests')


@app.on('shutdown')
async def on_shutdown():
    print('Shutting down')


@app.route('GET', '/api/hello/{name}/')
async def hello_handler(request, name):
    return Response(
        {'result': f'Hello {name}!'},
        status=200,
        headers=[('Content-Type', 'application/json')],
    )
uvicorn example:app

visit docs for more infomation.

License

Code and documentation are available according to the MIT License:page_with_curl: (see LICENSE).

The NanoASGI logo however is NOT covered by that license. It is allowed to use the logo as a link to the repo or in direct context with the unmodified library. In all other cases, please ask first.

Buy Me A Coffee

LOGO - Perditax, CC0, via Wikimedia Commons

Metadata

Release files for NanoASGI 0.0.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for NanoASGI 0.0.5
File Size Uploaded
NanoASGI-0.0.5.tar.gz 6.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for NanoASGI 0.0.5
File Interpreter ABI Platform
NanoASGI-0.0.5-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 14.7 kB

Release files / NanoASGI-0.0.5.tar.gz

Download URL NanoASGI-0.0.5.tar.gz
Size 6.3 kB
Tags Source
SHA-256 checksum
How to use checksums
83572d32a0de71fa4392b5fea3ad22011250525df1ccd2c44996fd4977495ecf
BLAKE2b-256 checksum
How to use checksums
0a8b2f5a611a38257b5cd8e707b8d3a35347e84443586655e8cf95c74e5f0792
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.15.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/44.1.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/2.7.16

Release files / NanoASGI-0.0.5-py2.py3-none-any.whl

Download URL NanoASGI-0.0.5-py2.py3-none-any.whl
Size 8.4 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
709c3df8b215f0a528a6169905252e2ca4463791b10df82b6b01d6b1c3a8c69c
BLAKE2b-256 checksum
How to use checksums
d807ee512a15f5d43517998e5a08f737cd1fc7c4130e364e8113b76ff5b267df
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.15.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/44.1.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/2.7.16

Release history Release notifications | RSS feed

This release

0.0.5 This release

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

0.0.0

1 release file

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