Re:Show HN: FastOpenAPI – automated docs for many Python fra...
by gister123 on Saturday March 22, 2025 @01:43PM
(#43447347)
Python async has been a big mess. I haven’t looked back since moving to a Go + GRPC + Protobuf stack. I would highly recommend it.
[ Parent
| on HN ]
Re:Show HN: FastOpenAPI – automated docs for many Python fra...
by jt_b on Saturday March 22, 2025 @03:40PM
(#43448078)
Love Go (and async python, for different reasons) but miss me with the gRPC unless you are building hardened internal large enterprise systems. We adopted it at a late stage startup for a microservices architecture, and the pain is immense.
So many issues with type duplication due to weird footguns around the generated types. Lots of places where we needed to essentially duplicate a model due to the generated types not allowing us to modify or copy parts of a generated type's value and so forth.
Re:Show HN: FastOpenAPI – automated docs for many Python fra...
by qwertox on Saturday March 22, 2025 @02:03PM
(#43447464)
I really enjoy Python's asyncio. I'm a big fan of aiohttp and the entire aio* ecosystem.
Then there's Rust's Tokio for the things that need performance.
Re:Show HN: FastOpenAPI – automated docs for many Python fra...
by linkdd on Sunday March 23, 2025 @02:08AM
(#43451162)
You should take a look at AnyIO, which unifies asyncio and Trio (it can use both event loops as a backend).
Two big deals of Trio and AnyIO are channels (similar to Go's channels), the ability to return data from starting a task in a nursery/task group:
async def my_consumer(task_status = anyio.TASK_STATUS_IGNORED):
tx, rx = anyio.create_memory_object_stream()
task_status.started(tx)
async for message in rx:
...
async def my_producer(tx):
await tx.send("hello")
await tx.send("world")
await tx.aclose()
async def main():
async with anyio.create_task_group() as tg:
tx = await tg.start(my_consumer)
tg.start_soon(my_producer, tx)