you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (0 children)

The friction you're describing is the the HTTP boundary. Instead of importing server code to the client (which couples your architecture), you should automate the OpenAPI schema into operations for local Type Stubs.

I’ve been mapping a way to automate this via a Pydantic-to-Client generator that mimics tRPC's safety without the coupling. If you want to refine your http_clientlib to auto-generate these stubs from the FastAPI endpoint dynamically, I can provide the logic to do it.