A high-performance Python framework.

pyronaut.io · 2026-10-05 · by Long Nguyen ·generic
Pyronaut is a high-performance Python framework for building production services with rich data access, observability, cloud integrations, build-time validation, testing, and enterprise support.

A high-performance Python framework.

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.

Get startedExplore the framework

`$ pip install pyronaut$ pyronaut create rocket-service`Copy

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

rockets.pytest\_rockets.pyterminal

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.

imports

from typing import Any

import pytest import requests

from pyronaut.test import MicronautTest, micronaut_test_fixture

@pytest.fixture
def application_context(request: Any) -> Any:
    fixture = micronaut_test_fixture(request, MicronautTest())
    yield fixture
    fixture.stop()

@pytest.fixture def client(application_context: Any) -> requests.Session: return requests.with_context(application_context)

def test_launch(client: requests.Session): rocket = {"name": "Ariane 7", "thrust_kn": 15000}

created = client.post("/rockets", json=rocket) assert created.status_code == 201 assert created.json()["id"] is not None

found = client.get("/rockets/search/Ariane").json() assert "Ariane 7" in [r["name"] for r in found]

def test_validation(client: requests.Session): response = client.post( "/rockets", json={"name": "", "thrust_kn": -1} ) assert response.status_code == 400

pytest runs against the same embedded server, DI context, and Test Resources database the application uses.

$ pip install pyronaut

$ pyronaut create rocket-service Resolved Micronaut platform 5.x via Maven Created rocket-service/ with pyproject.toml

$ pyronaut dev Test Resources: mysql:8 ready on :3306 Server running on http://localhost:8080 (reload on)

$ pyronaut test 12 passed in 3.4s (JUnit XML + HTML report)

$ pyronaut validate-config --env production Configuration OK · DI graph OK

$ pyronaut build --native-base Native executable: build/rocket-service

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

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.

| Area | A representative FastAPI stack | Pyronaut | | -------------- | ----------------------------------- | ----------------------------------------------------------------------- | | HTTP & data | FastAPI + Uvicorn + SQLAlchemy | Micronaut HTTP on Netty + Micronaut Data | | Types & config | Pydantic + Pydantic Settings | Build-time processing for DI, validation, and serialization | | Testing | pytest + Testcontainers + fixtures | pytest + Micronaut Test + Test Resources | | Observability | structlog + OpenTelemetry + OpenAPI | Micrometer metrics + OpenTelemetry tracing + observability integrations | | Deployment | Dockerfiles + CI templates | Production 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 developersBuild with one consistent application model.

ArchitectsStandardize how teams build and run production Python services.

Platform engineeringGive teams one path from project creation to production artifact.

Engineering leadershipAdopt 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.

Read the docsView the repository

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

pyronaut.io · 3 images · 21 links

Comments (0)

No comments yet