Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/ScrapeGraphAI/toonify
/ pydantic_usage.py
File
pydantic_usage.py
examples/pydantic_usage.py:None–None ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
1
""
"Examples demonstrating Pydantic model conversion with TOON."
""
2
try
:
3
from
pydantic
import
BaseModel, Field
4
from
toon
import
encode_pydantic, decode_to_pydantic, encode
Callers
nothing calls this directly
Calls
8
example_simple_model
Function · 0.85
example_list_of_models
Function · 0.85
example_nested_models
Function · 0.85
example_exclude_options
Function · 0.85
example_field_aliases
Function · 0.85
example_roundtrip
Function · 0.85
example_comparison
Function · 0.85
example_decoding
Function · 0.70
Tested by
no test coverage detected