MCPcopy Index your code
hub / github.com/ScrapeGraphAI/toonify / demo_delimiters

Function demo_delimiters

demo.py:82–99  ·  view source on GitHub ↗

Different delimiter demo.

()

Source from the content-addressed store, hash-verified

80 print(json.dumps(result, indent=2))
81
82def demo_delimiters():
83 """Different delimiter demo."""
84 print_section("Custom Delimiters")
85
86 data = {
87 "items": [
88 {"code": "A001", "name": "Widget", "price": 19.99},
89 {"code": "B002", "name": "Gadget", "price": 29.99}
90 ]
91 }
92
93 print("Tab delimiter (for spreadsheets):")
94 toon_tab = encode(data, {"delimiter": "tab"})
95 print(toon_tab)
96
97 print("\nPipe delimiter (when data has commas):")
98 toon_pipe = encode(data, {"delimiter": "pipe"})
99 print(toon_pipe)
100
101def demo_key_folding():
102 """Key folding demo."""

Callers 1

mainFunction · 0.85

Calls 2

encodeFunction · 0.90
print_sectionFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…