I use pydantic, and then use the json schema output to generate typescript interface definitions. This gives me pretty good velocity by having a single ground truth.
The application I'm working on predates FastAPI, so I'm using CherryPy and modified their JSON tool to call the parse_obj() and json() on the model where needed.
The application I'm working on predates FastAPI, so I'm using CherryPy and modified their JSON tool to call the parse_obj() and json() on the model where needed.