Skip to content

ChainX recipes

Maturity labels

  • Now: Stable and supported in current releases.
  • Preview: Usable today, but behavior and APIs may evolve.
  • Planned: Not yet implemented.

Note

Status: Now

Recipe: parse tabular text to rows

>>> import omnipy as om
>>> tsv = "a\tb\n1\t2\n3\t4\n"
>>> om.TsvTableModel(tsv)

Recipe: follow with typed row conversion

>>> import omnipy as om
>>> import pydantic as pyd
>>> class Row(pyd.v1.BaseModel):
...     a: int
...     b: int
>>> om.Model[list[Row]](om.TsvTableModel("a\tb\n1\t2\n"))

When to switch to compute flows

If transformation requires branching/joins, use dataflow Tasks/Flows instead of linear model chains.