minicorn 1.1.0
minicorn 1.1.0 - ASGI Support
A major feature release introducing full ASGI 3.0 support, bringing minicorn into the async world alongside the existing WSGI server.
New Features
- ASGI 3.0 Server - Full support for async ASGI applications (FastAPI, Starlette, Quart, etc.) built on Python's
asyncio - Concurrent Request Handling - Async I/O enables handling multiple requests concurrently without threading
- HTTP/1.1 for ASGI - Complete HTTP/1.1 implementation for ASGI apps including keep-alive, chunked transfer encoding, and streaming
- ASGI Lifespan Protocol - Supports
lifespan.startupandlifespan.shutdownevents for proper app initialization/cleanup - CLI
--asgiFlag - Simple toggle to switch between WSGI and ASGI mode:minicorn fastapi_app:app --asgi
- Auto-reload for ASGI - The
--reloadflag works seamlessly with ASGI applications too
Changes
- Dual Server Architecture - minicorn now ships with two server cores:
minicorn.wsgi_server- Synchronous WSGI server (unchanged from 0.1.0)minicorn.asgi_server- New async ASGI server
- Updated Exports - New
serve_asgi()andrun_asgi()functions available from theminicornpackage
Quick Start (ASGI)
# Install
pip install minicorn
# Run a FastAPI app
minicorn main:app --asgi
# Run with custom host/port and auto-reload
minicorn main:app --asgi --host 0.0.0.0 --port 8080 --reloadNotes
- ASGI support is marked as BETA in this release
- The WSGI server remains fully stable and unchanged
- Requires Python 3.10+