Thanks to visit codestin.com
Credit goes to context-plugin-any.pydantic-docs.pages.dev

Rich

Pydantic models may be printed with the Rich library which will add additional formatting and color to the output. Here's an example:

Printing Pydantic models with Rich

See the Rich documentation on pretty printing for more information.