Loading repository data…
Loading repository data…
bRuttaZz / repository
A single-file ASGI server written in vanilla python: a basic implementation of the ASGI specification using pure Python asyncio.
A transparent discovery signal based on current public GitHub metadata.
This score does not audit code, security, maintainers, documentation quality, or suitability. Verify the repository and its current documentation before adoption.
Nothing but a vanilla-py ASGI server.
A simple implementation of the ASGI specification 2.5 (2024-06-05) using pure Python and asyncio (Py3.9 or above). The system is meant to use zero external libraries and contained in a single file, because why not...?
pip install vanillacorn
# 1. Download `vanillacorn.py`
wget https://raw.githubusercontent.com/bRuttaZz/vanillacorn/refs/heads/main/vanillacorn.py
# 2. Make it executable
chmod +x vanillacorn.py
# 3. Run the server
./vanillacorn.py --help
# [or] run it with python interpreter
python3 vanillacorn.py --help
usage: vanillacorn [-h] [-v] [-p PORT] [-b HOST] [-w WORKERS] [-s] [--verbose] [-l FILE] [--ssl-keyfile FILE] [--ssl-certfile FILE] [asgi_app]
A simple ASGI server: a basic implementation of the ASGI specification using pure Python and asyncio.
positional arguments:
asgi_app ASGI app module
options:
-h, --help show this help message and exit
-v, --version App version
-p, --port PORT Bind socket to this port (default: 8075)
-b, --host HOST Bind socket to this host. (default: localhost)
-w, --workers WORKERS
Number of worker processes
-s, --silent Suppress console logging
--verbose Show detailed logging
-l, --log-file FILE Write server logs into log file
--ssl-keyfile FILE SSL key file for TLS
--ssl-certfile FILE SSL certfile for TLS
To start a simple asgi application say main:app
vanillacorn -p 8000 main:app
# to run in https mode
vanillacorn -p 8000 --ssl-key key.pem --ssl-cert cert.pem main:app