Welcome to data_manifestor’s documentation!¶
Indices and tables¶
Core API¶
Awesome data_manifestor is a Python cli/package created with https://github.com/TezRomacH/python-package-template
- data_manifestor.compare_manifest_to_local(local_dir: str, *args: str, template_dict: Optional[dict[str, Any]] = None) LocalComparisonResult ¶
Gets data manifestor template associated with a given project_name
- Parameters
local_dir – The local file directory to search for files.
args – Arguments to supply to template_dict if supplied.
template_dict – dict representation of a Template.
- Raises
ManifestError – Invalid template supplied.
- Returns
Results of the comparison.
Notes
If template_dict and args aren’t supplied, they will be
inferred from the local_dir you’re running a local comparison on.
- data_manifestor.get_project_data_manifestor_template(project_name: str = 'default', client: Optional[Any] = None) Any ¶
Gets data manifestor template associated with a given project_name.
- Parameters
project_name – project_name associated with the template.
client – pymongo.MongoClient instance to query.
- Returns
Associated template or None if one doesn’t exist.
- data_manifestor.update_project_data_manifestor_template(project_name: str, _template: Union[Template, dict[str, Any]], client: Optional[Any] = None) Any ¶
Gets data manifestor template associated with a given project_name
- Parameters
project_name – project_name associated with the template to update.
_template – Updated template (or dict representation) to associate with project_name.
client – pymongo.MongoClient instance to query.
- Raises
DataManifestorError – Invalid template supplied.
- Returns
Inserted mongodb record.
Notes
The full template is expected for _template.
For more about project_name please refer to np_lims_tk docs.