Genro ASGI Documentation
Genro ASGI is a minimal, stable ASGI foundation - a framework-agnostic toolkit for building high-performance web services.
Overview
Genro ASGI provides essential components for ASGI applications:
Core ASGI server with routing via genro_routes
Request/Response utilities
Lifespan management
Essential middleware (CORS, errors, compression, logging)
Static file serving via StaticSite application
WebSocket extension protocol (WSX)
Zero external dependencies (stdlib only, optional orjson)
Features
Zero Dependencies: Built entirely on Python stdlib
Framework-Agnostic: Use as foundation or integrate with existing frameworks
Production-Ready: Minimal, tested, and stable
Type-Safe: Full type hints for better IDE support
Router Integration: Uses genro_routes for flexible routing
Static Files: Built-in StaticSite application for serving static content
Installation
# Basic installation
pip install genro-asgi
# With fast JSON support
pip install genro-asgi[json]
Quick Start
CLI - Serve static files:
# Create config.yaml
cat > config.yaml << EOF
server:
host: "127.0.0.1"
port: 8000
apps:
static:
module: "genro_asgi:StaticRouter"
directory: "./public"
index: "index.html"
EOF
# Run server
python -m genro_asgi serve .
Python - Custom server:
from genro_asgi import AsgiServer, Response
server = AsgiServer(server_dir=".")
server.run() # Starts uvicorn
Contents
License
Copyright 2025-2026 Softwell S.r.l.
Licensed under the Apache License, Version 2.0.