Examples¶
These standalone source files follow the teaching arc from basic mappings through optional integrations.
Teaching arc¶
basics.py: implicit same-name dataclass mappingconstructs.py: field, object, nested, and control constructsexpansion.py: expansion and reverse mappingcomposition.py: declaration order and last-write-wins behaviorpydantic.py: dataclass source and Pydantic destinationsqlalchemy.py: dataclass source and SQLAlchemy destinationcombined.py: bidirectional Pydantic and SQLAlchemy boundary mappingcheckout.py: a complete checkout mapping with nested lines, runtime currency context, aliases, and a persisted total
The reference files are source examples, not a Python package or command-line interface. Run betwixt-demo for the
guided, executable walkthrough. The demo is implemented separately under betwixt_demo.