YamlRepoExportBackend¶
- 
class 
lsst.daf.butler.YamlRepoExportBackend(stream: IO, universe: lsst.daf.butler.core.dimensions._universe.DimensionUniverse)¶ Bases:
lsst.daf.butler.transfers._interfaces.RepoExportBackendA repository export implementation that saves to a YAML file.
Parameters: - stream
 A writeable file-like object.
Methods Summary
finish()Complete the export process. saveCollection(record, doc, None])Export a collection. saveDatasetAssociations(collection, …)Export the dataset-collection associations for a single collection. saveDatasets(datasetType, run, *datasets)Export one or more datasets, including their associated DatasetType and run information (but not including associated dimension information). saveDimensionData(element, *data)Export one or more dimension element records. Methods Documentation
- 
finish() → None¶ Complete the export process.
- 
saveCollection(record: lsst.daf.butler.registry.interfaces._collections.CollectionRecord, doc: Optional[str, None]) → None¶ Export a collection.
This only exports the collection’s own state, not its associations with datasets.
Parameters: 
- 
saveDatasetAssociations(collection: str, collectionType: lsst.daf.butler.registry._collectionType.CollectionType, associations: Iterable[lsst.daf.butler.core.datasets.association.DatasetAssociation]) → None¶ Export the dataset-collection associations for a single collection.
Parameters: - collection : 
str The name of the collection.
- collectionType : 
CollectionType The type of the collection; either
CollectionType.TAGGEDorCollectionType.CALIBRATION(as other collection types are exported in other ways).- associations : 
Iterable[DatasetAssociation] Structs representing an association between this collection and this dataset.
- collection : 
 
- 
saveDatasets(datasetType: lsst.daf.butler.core.datasets.type.DatasetType, run: str, *datasets) → None¶ Export one or more datasets, including their associated DatasetType and run information (but not including associated dimension information).
Parameters: - datasetType : 
DatasetType Type of all datasets being exported with this call.
- run : 
str Run associated with all datasets being exported with this call.
- datasets : 
FileDataset, variadic Per-dataset information to be exported.
FileDataset.formatterattributes should be strings, notFormatterinstances or classes.
- datasetType : 
 
- 
saveDimensionData(element: lsst.daf.butler.core.dimensions._elements.DimensionElement, *data) → None¶ Export one or more dimension element records.
Parameters: - element : 
DimensionElement The
DimensionElementwhose elements are being exported.- data : 
DimensionRecord(variadic) One or more records to export.
- element :