Flasio

Flask simplicity. Async power. An async-first ASGI web framework I wrote from scratch and published on PyPI.

A lightweight Python web framework that keeps the Flask-style decorator API and runs on ASGI. It ships routing with blueprints, middleware, structured HTTP errors, templates, static files, a CLI, and opt-in services for email, auth, databases and Cloudinary, all behind a small core.

Proves

  • Python internals
  • ASGI and async I/O
  • API design
  • Packaging and CLI
  • Security defaults

Decisions that carry it

  • ASGI-first, small core. The application is a plain ASGI callable, app(scope, receive, send). Optional integrations are opt-in and add no work to requests that do not use them.
  • Routing built for low overhead. Static routes are an exact-match dictionary lookup and dynamic routes are compiled once at registration. Any speed claim against Flask must come from repeatable benchmarks, so none is made without them.
  • Safe defaults. Production errors never expose stack traces or secrets. Body-size limits, static-file path-traversal protection and one response-start per request are part of the design.
  • Familiar but modular. Decorator routes and prefixed blueprints give Flask-style ergonomics on an async core, with explicit middleware order and an explicit service registry.
  • Shipped as a real package. Distributed on PyPI through pyproject.toml with a flasio CLI. Optional extras keep the core dependency list minimal.

Built with

  • Python
  • ASGI
  • Uvicorn
  • Jinja2 (optional)
  • asyncpg
  • aiosqlite
  • Cloudinary
  • PyPI

Links