fastware v0.1.0 /fastware vs Starlette
On this page

Comparison of fastware and Starlette: batteries-included framework (SSE, auth, server lifecycle) vs lightweight modular ASGI toolkit.

#fastware vs Starlette

Starlette is a lightweight ASGI toolkit that provides the building blocks for web applications. FastAPI, for example, is built on top of Starlette. fastware is a batteries-included framework that provides the assembled product -- routing, server management, SSE, auth, and middleware all ship together.

#Toolkit vs framework

The core difference is scope and assembly level. Starlette gives you the parts and leaves assembly to you; fastware gives you the assembled product with 5 built-in middleware classes, a managed Granian server, SSE broadcasting, auth, and DI all wired together out of the box:

Starlette provides building blocks. You get a router, request/response classes, middleware protocol, WebSocket support, and a test client. You assemble them into an application, choose a server (Uvicorn, Hypercorn, Daphne), configure middleware, pick a JSON library, add auth, and wire up SSE yourself.

fastware provides the assembled product. You get the same building blocks, but also a managed Granian server, SSE broadcaster, auth module, dependency injection, feature flags, error logging, background tasks, dev mode with Vite proxy, and a CLI -- all designed to work together.

#Feature comparison

Feature comparison
fastwareStarlette
RoutingRouter with {param}, {param:int}, {param:path}Router with {param}, {param:int}, {param:path}, {param:float}
Request/ResponseRequest, JSONResponse, HTMLResponse, StreamResponse, FileResponse, etc.Request, JSONResponse, HTMLResponse, StreamingResponse, FileResponse, etc.
JSON enginemsgspec (10-75x faster than stdlib json)stdlib json
ASGI serverGranian (managed lifecycle, PID files, stop/status)None (BYO: Uvicorn, Hypercorn, etc.)
Middleware5 built-in (CORS, RequestID, RequestTiming, TrustedHost, ViteDevProxy)5 built-in (CORS, TrustedHost, HTTPSRedirect, GZip, Sessions)
SSEBuilt-in Broadcaster with typed events, heartbeat, auto-pruningNot included (use StreamingResponse manually)
WebSocketSupported with DISupported
Dependency injectionDependencyResolver (sync/async factories, generator cleanup)Not included
AuthJWT, passwords, CSRF, rate limiting, user storageNot included
Background tasksTaskRegistry with feature gatingBackgroundTask (per-response, no registry)
Test clientBuilt-in TestClient and AsyncTestClientTestClient (based on httpx)
Static filesBuilt-in with SPA fallbackStaticFiles (no SPA fallback)
Dev modedev() with Vite proxy and HMRNot included
Feature flagsBuilt-in FeatureFlagsNot included
Error logSQLite-backed ErrorLogNot included
Exception handlersPer-type with MRO-based priorityPer-type
Mount sub-appsrouter.mount(prefix, app)Mount(path, app)
LifespanAsync context managerAsync context manager

#What Starlette does differently

Starlette is intentionally minimal -- it ships with only 2 required dependencies (anyio and typing_extensions) compared to fastware's 2 required dependencies (msgspec and granian). But Starlette's minimalism is a deliberate design choice that enables flexibility, and comes with 5 concrete advantages:

  • Lighter dependency footprint: Starlette has no required dependencies beyond anyio and typing_extensions. fastware requires msgspec and granian.
  • More server choices: Because Starlette does not manage a server, you can run it on Uvicorn, Hypercorn, Daphne, or any ASGI server. fastware is opinionated about Granian.
  • Foundation for other frameworks: Starlette is designed to be built upon. FastAPI, Starlite (now Litestar), and others extend it. fastware is a standalone framework, not a toolkit for building frameworks.
  • HTTPSRedirect and GZip middleware: Starlette includes these out of the box. fastware does not have them built in.
  • Sessions middleware: Starlette has cookie-based sessions. fastware has JWT-based auth with session cookies, which is a different approach.
  • Mature and battle-tested: Starlette has been in production at scale for years. fastware is new.

#When to choose fastware

  • You want a framework that includes everything from auth to server management, rather than assembling pieces yourself.
  • You want msgspec performance for JSON serialization without manually wiring it in.
  • You need SSE broadcasting as a first-class feature.
  • You want serve() / stop() / status() with PID files and process management instead of configuring a server separately.
  • You are building a full-stack app with Vite and want the dev proxy built in.

#When to choose Starlette

  • You want a minimal toolkit and prefer to choose each component yourself.
  • You need to run on a server other than Granian (Uvicorn, Hypercorn, Daphne).
  • You are building a framework on top of ASGI foundations rather than an application.
  • You want the lightest possible dependency footprint.
  • You need the maturity and community support of a well-established project.