How kobotoolbox/kobo-transfer works
kobo-transfer is a CLI for moving KoboToolbox assets and submissions between source and destination projects. Its principal workflow optionally recreates an asset and its versions, then downloads submission attachments, transforms and uploads submission XML, with an optional UUID-difference sync. Validation statuses and analysis metadata are separate optional phases. The graph distinguishes the CLI orchestrator from transfer modules and shared configuration/utilities. Sampled code supports the shown calls; the README documents additional usage options, but unsampled modules are not inferred beyond those capabilities.
Main entry points: run.py CLI workflow · xml.py Submission XML · asset.py Asset transfer · validation_status.py Status sync
Components 15
CLI orchestration
- CLI workflow
run.py
Transfer stages
- Asset transfer
transfer/asset.py - Attachment transfer
transfer/media.py - Submission XML
transfer/xml.py - Status sync
transfer/validation_status.py - Analysis sync
transfer/analysis.py
Configuration and utilities
- Project config
helpers/config.py - Singleton
helpers/singleton.py - List joins
utils/joins.py - Chunking
utils/iterators.py - Filename cleanup
utils/text.py
Transfer state
- Local attachments
Other components
- Operator
- Source project
- Destination project
Connections 29
- Operator → CLI workflow: runs
README.md - CLI workflow → Project config: loads config
run.py - Project config → Singleton: uses metaclass
helpers/config.py - Project config → Source project: validates access
helpers/config.py - Project config → Destination project: validates access
helpers/config.py - CLI workflow → Source project: lists UUIDs
run.py - CLI workflow → Destination project: lists UUIDs
run.py - CLI workflow → Asset transfer: starts transfer
run.py - Asset transfer → Source project: reads asset versions
transfer/asset.py - Asset transfer → Destination project: creates and deploys
transfer/asset.py - Asset transfer → Source project: downloads form media
transfer/asset.py - Asset transfer → Destination project: uploads form media
transfer/asset.py - CLI workflow → Attachment transfer: downloads attachments
run.py - Attachment transfer → Source project: fetches attachments
transfer/media.py - Attachment transfer → Local attachments: writes files
transfer/media.py - CLI workflow → Submission XML: transfers submissions
run.py - Submission XML → Source project: fetches submission XML
transfer/xml.py - Submission XML → Destination project: posts submission XML
transfer/xml.py - Submission XML → Local attachments: reads media files
transfer/xml.py - Submission XML → Attachment transfer: uses media cleanup
transfer/xml.py - Submission XML → Filename cleanup: cleans filenames
transfer/xml.py - CLI workflow → Status sync: syncs statuses
run.py - Status sync → Source project: reads statuses
transfer/validation_status.py - Status sync → Destination project: updates statuses
transfer/validation_status.py - Status sync → List joins: joins submissions
transfer/validation_status.py - Status sync → Chunking: chunks updates
transfer/validation_status.py - CLI workflow → Analysis sync: syncs analysis
run.py - Analysis sync → Source project: reads analysis data
transfer/analysis.py - Analysis sync → Destination project: posts analysis data
transfer/analysis.py