Pyronaut

A high-performance Python framework.

Built on Micronaut and GraalVM

Build production services with rich data access, observability, cloud integrations, build-time validation, integrated testing, and enterprise support.

$ pip install pyronaut$ pyronaut create rocket-service
Pyronaut mascot — an astronaut with a Python-powered flamethrower
hello.py
@Get("/hello/{name}")
def hello(name: str):
    return {"message": f"Hello, {name}"}
sustained throughput · HTTPS/HTTP2
  • Pyronaut35,351 req/s
  • FastAPI + Granian13,576 req/s
  • Flask + Gunicorn5,453 req/s
See the performance benchmarks

Write Python. Get the platform around it.

Your Python types and annotations define routing, validation, serialization, dependency injection, OpenAPI, and tests.

Pyronaut processes the application model before startup, enabling earlier validation and carrying the same model through development, testing, and packaging.

  • One type definition drives the application model
  • Check configuration and dependency wiring before runtime
  • One application model spans development, tests, and packaging
imports
from dataclasses import dataclass
from typing import Annotated, List

from jakarta.inject import Inject
from jakarta.validation import Valid
from jakarta.validation.constraints import NotBlank, Positive
from micronaut.data.annotation import GeneratedValue, Id, MappedEntity
from micronaut.data.jdbc.annotation import JdbcRepository
from micronaut.data.repository import CrudRepository
from micronaut.http import HttpResponse
from micronaut.http.annotation import Body, Get, Post
from micronaut.serde.annotation import Serdeable
@dataclass
@MappedEntity
@Serdeable
class Rocket:
    id: Annotated[int | None, Id, GeneratedValue]
    name: str
    thrust_kn: float


@Serdeable
@dataclass
class LaunchCommand:
    name: Annotated[str, NotBlank]
    thrust_kn: Annotated[float, Positive]


@JdbcRepository(dialect="MYSQL")
class RocketRepository(CrudRepository[Rocket, int]):

    def findByNameContains(self, fragment: str) -> List[Rocket]: ...


rockets: Annotated[RocketRepository, Inject]


@Get("/rockets")
def fleet() -> List[Rocket]:
    return rockets.findAll()


@Get("/rockets/search/{fragment}")
def search(fragment: str) -> List[Rocket]:
    return rockets.findByNameContains(fragment)


@Post("/rockets")
def launch(command: Annotated[LaunchCommand, Body, Valid]) -> HttpResponse:
    rocket = Rocket(None, command.name, command.thrust_kn)
    return HttpResponse.created(rockets.save(rocket))

Use Micronaut annotations directly from Python for data access, routing, dependency injection, validation, and serialization.

From Python source to a production artifact.

One CLI coordinates creation, development, testing, validation, and packaging.

  1. Create

    pyronaut create

    Generate a project with platform dependencies resolved.

  2. Develop

    pyronaut dev

    Local server with automatic reload and managed Test Resources.

  3. Test

    pyronaut test

    Run pytest against the real application context and test infrastructure.

  4. Validate

    pyronaut validate-config

    Check configuration and DI wiring for dev, run, test, and production.

  5. Package

    pyronaut build

    Produce a wheel, container image, or native executable.

A representative FastAPI stack vs. Pyronaut

FastAPI is a strong HTTP framework. Pyronaut takes a different approach, combining high performance with data access, observability, build-time validation, testing, and production packaging.

AreaA representative FastAPI stackPyronaut
HTTP & dataFastAPI + Uvicorn + SQLAlchemyMicronaut HTTP on Netty + Micronaut Data
Types & configPydantic + Pydantic SettingsBuild-time processing for DI, validation, and serialization
Testingpytest + Testcontainers + fixturespytest + Micronaut Test + Test Resources
Observabilitystructlog + OpenTelemetry + OpenAPIMicrometer metrics + OpenTelemetry tracing + observability integrations
DeploymentDockerfiles + CI templatesProduction packaging + supported cloud integrations
…and every integration between them…designed to work together

For teams building production Python services.

Choose Pyronaut when your Python services need high performance and deeper production capabilities.

Python developers
Build with one consistent application model.
Architects
Standardize how teams build and run production Python services.
Platform engineering
Give teams one path from project creation to production artifact.
Engineering leadership
Adopt a high-performance Python framework with enterprise support.

Build your first Pyronaut service.

Start with HTTP, data access, validation, observability, testing, and production packaging in one Python project.

Already building on Micronaut? Add Python without adding a second application platform. Use Python on the Micronaut platform you already know.