AsyncFast – a typed, message-driven framework inspired by FastAPI
AsyncFast – a typed, message-driven framework inspired by FastAPI
Hi HN, I've been working on AsyncFast, a Python framework for building message-driven APIs with FastAPI-style ergonomics. The goal is to let you write handlers once and run them unchanged across different brokers and runtimes (Kafka, SQS, MQTT, Redis, containers, Lambda, etc.). Under the hood it's built on a small spec (AMGI) that plays a similar role to ASGI, but for message-based systems instead of HTTP. Minimal example from asyncfast import AsyncFast from pydantic import BaseModel app = AsyncFast() class Payload(BaseModel): id: str name: str @app.channel("channel") async def handle_channel(payload: Payload) -> None: print(payload) Running it locally (Kafka example) pip install asyncfast amgi-aiokafka asyncfast run app:app kafka --bootstrap-servers localhost:9092 The same application code can be run against different brokers by swapping the runtime adapter. Key ideas: - broker-agnostic application code - explicit, typed address parameters / payloads / headers - portability between long-running consumers and serverless environments Docs: https://asyncfast.readthedocs.io Source: https://github.com/asyncfast/amgi AMGI: https://amgi.readthedocs.io This is still early and evolving - I'd be especially interested in feedback from people who've built Kafka or event-driven systems and had to deal with portability, or tight broker coupling issues.
Share cardActual performance
Launch Intel predictions
Analyze your own launch →Incorrect prediction on native model
Similar products
Usher – Golang REST framework inspired by K8s apimachinery
A framework inspired by rejecting React, that's less code
Dumbo – Hono inspired framework for PHP
Rails-Inspired PHP Framework
Spiral 2.0 – A Coachella-inspired local message board app
KafkaLite – A simple message broker inspired by Kafka
oosh – Annotation-driven CLI framework for Bash
XKCD-inspired StackSort
Experimental Hyperdocument System Inspired by Doug Engelbart
Heresy, a BASIC-inspired functional Lisp