hn.today

Introducing Pyronaut

pyronaut.io8 points0 comments
Screenshot of Introducing Pyronaut

Pyronaut is a high-performance Python application platform that brings Micronaut’s JVM-era ideas - AOT compilation, build-time validation and source processing - into Python by fusing the Python AST with the Java compiler and optimizing runtime with GraalVM and the Graal JIT. It serves Python code on Micronaut’s Netty-based HTTP server, wires asyncio into the Netty event loop (so no asyncio.run or uvicorn is needed), and supports async/await, streaming endpoints with back-pressure, and awaiting Java reactive Publishers and CompletableFutures. Benchmarks cited show about 2.6× the throughput of FastAPI and 6.5× that of Flask with lower latency. Examples include minimal route handlers, async streaming SSE, and non-blocking HttpClient calls that interoperate directly with Java libraries.

Build-time processing surfaces Python decorators from Java annotations, enabling Micronaut features like serialization, OpenAPI generation, messaging listeners, and a full Micronaut Data stack for JDBC/R2DBC/Hibernate/MongoDB/Azure with derived finders, explicit queries, pagination and transactional repositories; SQL is precomputed so query mistakes fail at build time not runtime. Developer tooling includes pyronaut dev/run/process/validate-config with configuration validation and reports. Applications can run on the JVM or GraalVM Crema (a precompiled native base image) to reduce memory and startup time, providing flexible deployment choices for production-ready Python services.

Read on pyronaut.io0 comments on Hacker News

Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.

More in Programming

The daily digest

Today's best Hacker News stories, summarized and screenshotted, one email a day.