-
Author here: This specific example is a perfect case of the thing the post calls out! API boundaries are one of the most important places where we need to maintain invariants about our code base, one of the most important places that it is important not to have to worry about “keeping things in sync” as you say.
In the TypeScript world, there are a number of libraries that can handle creating types from deserialization logic: Zod [1], Superstruct [2], Typebox [3], etc. – and Typebox specifically does what you are looking to do with MyPy. I do not know the Python ecosystem at all anymore (it has been a decade!) but I would be surprised if nothing like that exists. If it does, there is a good chance it is associated with the functional programming enthusiast corner of the Python community, so you might look there!
[1]: https://github.com/colinhacks/zod
-
InfluxDB
Purpose built for real-time analytics at any scale. InfluxDB Platform is powered by columnar analytics, optimized for cost-efficient storage, and built with open data standards.
-
-