Demonstrates the full asset lifecycle using ob-project-utils:
register_data()/get_data()- Data asset registration and retrievalregister_model()/get_model()- Model asset registration and retrieval- Cross-flow asset consumption patterns
ob-asset-example/
├── obproject.toml # Project configuration
├── data/
│ └── sample_data/
│ └── asset_config.toml # Data asset definition
├── models/
│ └── sample_model/
│ └── asset_config.toml # Model asset definition
└── flows/
├── producer/
│ └── flow.py # Registers data and model assets
└── consumer/
└── flow.py # Retrieves assets from producer
Registers sample_data and sample_model assets, then verifies retrieval
within the same flow.
Retrieves assets registered by ProducerFlow, demonstrating the typical pattern where one flow produces assets and another consumes them.
python flows/producer/flow.py run
python flows/consumer/flow.py run-
Deploy the project:
obproject-deploy
-
Run ProducerFlow (registers assets):
python flows/producer/flow.py --environment pypi argo-workflows create
-
Run ConsumerFlow (retrieves assets):
python flows/consumer/flow.py --environment pypi argo-workflows create
To develop locally while reading assets from a deployed branch, add to obproject.toml:
[dev-assets]
branch = "prod" # Read assets from prod branchThis enables the pattern of validating new code against production data while writing to an isolated branch.