The error message 'cannot import name multihostdsn from pydantic.networks' is caused for the new Pydantic v2 conflicting with the Pydantic v1. Fix it by reading this post!
Powerful type validation and discriminated Unions with Pydantic: Simplify data structures and ensure type safety. We are showcasing a few straightforward examples.