mirror of
https://github.com/kennethreitz/pydantic.git
synced 2026-06-05 23:00:18 +00:00
17b5ff42c1
* renaming docs examples * tweaks
764 B
764 B
!!! note Admission: I (the primary developer of pydantic) also develop python-devtools.
python-devtools (pip install devtools) provides a number of tools which
are useful during python development, including debug() an alternative to print() which formats output in a way
which should be easier to read than print as well as giving information about which file/line the print statement
is on and what value was printed.
pydantic integrates with devtools by implementing the __pretty__ method on most public classes.
In particular debug() is useful when inspecting models:
{!.tmp_examples/devtools_main.py!}
Will output in your terminal:
{!.tmp_examples/devtools_main.html!}