Get started with STAC Manager in 5 minutes by running your first pipeline.
Run a simple workflow that:
- Fetches STAC items from a local file
- Validates them against the STAC schema
- Outputs them to a structured directory
- STAC Manager installed (Installation Guide)
- Sample data available (generate with
scripts/generate_sample_data.py)
First, confirm STAC Manager is installed:
stac-manager --versionExpected output: stac-manager, version 1.0.0
Open samples/sentinel-2-l2a-api/workflows/00-quickstart.yaml to see the workflow definition:
name: quickstart-pipeline
steps:
- id: ingest
module: IngestModule
config:
mode: file
source: samples/sentinel-2-l2a-api/sample-data/items.json
collection_id: sentinel-2-l2a
- id: validate
module: ValidateModule
depends_on: [ingest]
config:
strict: true
- id: output
module: OutputModule
depends_on: [validate]
config:
base_dir: ./outputs
format: json
collection_id: sentinel-2-l2aWhat this does:
- IngestModule: Reads STAC items from a local JSON file (Sentinel-2 L2A collection)
- ValidateModule: Checks each item against STAC schema (strict mode)
- OutputModule: Writes validated items to
./outputs/sentinel-2-l2a/
Execute the workflow using the CLI:
stac-manager run-workflow samples/sentinel-2-l2a-api/workflows/00-quickstart.yamlExpected output:
Starting workflow: quickstart-pipeline
[ingest] Loaded N items from file
[validate] Validated N items (0 errors)
[output] Wrote N items to ./outputs/sentinel-2-l2a
✓ Workflow completed successfully
Time: ~5-10 seconds
Check the output directory:
ls -R outputs/sentinel-2-l2aYou should see:
outputs/sentinel-2-l2a/
├── collection.json # Collection metadata
└── items/
├── item_1.json
├── item_2.json
└── ... (more items)
View a single item:
cat outputs/sentinel-2-l2a/items/item_1.json | head -n 30STAC Manager executed three modules in sequence:
-
IngestModule (Fetcher)
- Role: Source of STAC items
- Action: Read items from
items.jsonfile - Output: Stream of STAC item dictionaries
-
ValidateModule (Modifier)
- Role: Transform/validate items in-flight
- Action: Check each item against STAC JSON schema
- Output: Only valid items pass through
-
OutputModule (Bundler)
- Role: Sink for processed items
- Action: Write items to disk in self-contained collection structure
- Output:
collection.json+ individual item files
This follows the Pipes and Filters pattern:
- Fetchers → generate items (IngestModule)
- Modifiers → process items (ValidateModule)
- Bundlers → consume items (OutputModule)
Data flows through the pipeline as an async stream, meaning STAC Manager can process millions of items without loading everything into memory.
Cause: Invalid YAML syntax or missing required fields.
Fix: Use the validation command to check your config:
stac-manager validate-workflow your-workflow.yamlCause: STAC Manager not installed correctly.
Fix: Reinstall:
pip install --upgrade stac-managerCause: Insufficient write permissions.
Fix: Use a different output directory:
config:
base_dir: ~/my-outputs # User home directoryModify the ingest step to fetch from Microsoft Planetary Computer:
- id: ingest
module: IngestModule
config:
mode: api
source: https://planetarycomputer.microsoft.com/api/stac/v1
collection_id: sentinel-2-l2a
max_items: 10
bbox: [-122.5, 37.5, -122.0, 38.0] # San Francisco Bay AreaRun the workflow again:
stac-manager run-workflow samples/sentinel-2-l2a-api/workflows/00-quickstart.yaml- 📚 System Architecture - Understand Pipes and Filters design
- 🔧 Module Reference - Complete module documentation
- 📖 Tutorials - Coming in Phase C (Basic, Update, and Extension pipelines)
You can also run workflows programmatically:
from stac_manager import StacManager
from pathlib import Path
# Load workflow
workflow_path = Path("samples/sentinel-2-l2a-api/workflows/00-quickstart.yaml")
manager = StacManager.from_yaml(workflow_path)
# Execute
result = await manager.run()
print(f"Processed {result.items_processed} items")
print(f"Failures: {result.failure_count}")See Python API Documentation for details.