litestar-granian

Integrates Litestar with Granian ASGI server, replacing uvicorn via drop-in plugin.

13|Updated Apr 15, 2026
One-click install
npx skills add https://github.com/litestar-org/litestar-skills --skill litestar-granian
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: litestar-granian
Source: https://github.com/litestar-org/litestar-skills/tree/main/plugins/litestar/skills/litestar-granian
Command: npx skills add https://github.com/litestar-org/litestar-skills --skill litestar-granian

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Litestar's default uvicorn ASGI server has lower throughput, no native HTTP/2 support, and higher memory usage, creating performance bottlenecks for production applications. This Skill provides a first-party, drop-in replacement with the Granian Rust-based ASGI server to eliminate these limitations.

Core Features & Use Cases

  • Drop-in Plugin Integration: Add GranianPlugin to your Litestar app with no major code changes, and the standard litestar run command automatically uses Granian instead of uvicorn.
  • Production-Grade Performance: Get native HTTP/2 support, higher throughput, and lower memory footprint for Litestar deployments, with full compatibility with Litestar's lifespan, signal handling, and dev-mode reload logic.
  • Use Case: Deploy a high-traffic Litestar API that requires HTTP/2 support and low memory usage, tuning worker counts, threading modes, and backpressure limits directly via the familiar litestar run CLI flags.

Quick Start

Use the litestar-granian skill to add GranianPlugin to your Litestar app and configure production-ready server settings via the standard litestar run CLI.

Frequently Asked Questions about litestar-granian

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I replace uvicorn with a faster ASGI server in my Litestar app?

Replace uvicorn by adding GranianPlugin to your Litestar application, which automatically routes the standard litestar run command to the Rust-based Granian ASGI server without major code changes.

Does Litestar support native HTTP/2 for production deployments?

Litestar achieves native HTTP/2 support for production deployments via the Granian Rust-based ASGI server integration, delivering higher throughput and lower memory consumption than the default uvicorn server.

Can I tune worker counts and threading modes when running a Litestar API?

You can tune worker counts, threading modes, backpressure limits, and SSL termination directly via familiar litestar run CLI flags when using the Granian server integration for production Litestar deployments.

What is the best way to lower memory usage for a high-traffic Litestar API?

Deploying with the Granian Rust-based ASGI server is the best way to lower memory usage for a high-traffic Litestar API, offering a lower memory footprint and higher throughput compared to the default uvicorn configuration.

Will switching ASGI servers break Litestar's dev-mode reload and lifespan management?

Switching to the Granian ASGI server will not break Litestar's dev-mode reload and lifespan management, as the first-party integration maintains full compatibility with Litestar's signal handling, plugin systems, and lifespan events.