datasource module
- class gridtools.datasource.DataSource
Bases:
object
- addDataSource(newDataSource, delete=False)
Add a new dataset to the catalog. This will not delete an exisiting dataset unless the delete flag is True. A complete description must be provided as the named dataset will completely replace any existing map if the delete flag is True.
- cleanCatalog(catalog)
This removes any empty/null values from the catalog prior to saving or printing the values.
- clearCatalog()
This clears the current catalog.
- loadCatalog(inFile, append=True, overwrite=False)
Loads catalog entries from a json or yaml file. Default behavior is only append entries (append=True). Any duplicate entries are ignored (overwrite=False). If you wish to only overwrite existing entries use append=False and overwrite=True. Using append=False and overwrite=False will do nothing. To append and/or replace entries use append=True and overwrite=True.
- saveCatalog(outFile)
Save currently stored catalog to a file in the chosen format by the extension. Supported extensions are: json, yaml