<jupyter_start><jupyter_text>List all collections ( Limit result to 32 --default to 1--)<jupyter_code>collections = cml.list_collections(limit=3)
print(collections)<jupyter_output>{'meta': {'name': 'cumulus-api', 'stack': 'ghrcwuat', 'table': 'collection', 'limit': 3, 'page': 1, 'count': 8}, 'results': [{'process': 'opendap', 'sampleFileName': 'TRMM_LIS_BG.04.3_2015.091.98991.nc', 'dataType': 'lislipG', 'granuleIdExtraction': '^((TRMM_LIS).*)', 'reportToEms': True, 'version': '4', 'createdAt': 1587483943951, 'granuleId': '^(TRMM_LIS).*\\.nc$', 'provider_path': 'opendap-data/lislipG/', 'meta': {'metadata_extractor': [{'lon_var_key': 'bg_data_summary_lon', 'regex': '^(TRMM_LIS).*\\.nc$', 'module': 'netcdf', 'time_var_key': 'bg_data_summary_TAI93_time', 'lat_var_key': 'bg_data_summary_lat'}]}, 'name': 'lislipG', 'files': [{'bucket': 'public', 'regex': '^TRMM_LIS(.*).*\\.cmr.xml$', 'sampleFileName': 'TRMM_LIS_BG.04.3_2015.091.98991.nc.cmr.xml'}, {'bucket': 'protected', 'regex': '^TRMM_LIS_(.*).*\\.(nc|dmrpp)$', 'sampleFileName': 'TRMM_LIS_BG.04.3_2015.091.98991.nc.dmrpp'}], 'duplicateHandling': 'skip', 'updatedAt': 1587483943951, 'url_path': 'lislipG__4', 'timestamp[...]<jupyter_text>Retrieve One specific collection<jupyter_code>collection = cml.list_collections(name="lislipG", version="4")
collection<jupyter_output><empty_output><jupyter_text>Retrieve a particular fields of a collection<jupyter_code>collection = cml.list_collections(name="lislipG", version="4", fields="provider_path,granuleIdExtraction")
collection<jupyter_output><empty_output><jupyter_text>Create a collection<jupyter_code>data = {
	"name": "test",
	"version": "t0",
	"provider_path": "/",
	"duplicateHandling": "replace",
	"granuleId": "^.*$",
	"granuleIdExtraction": "^(.*)",
	"sampleFileName": "test_file.nc",
	"files": [
		{
			"bucket": "public",
			"regex": "^(.*).*\\.cmr.xml$",
			"sampleFileName": "test_file.nc.cmr.xml"
		},
		{
			"bucket": "protected",
			"regex": "^(.*).*\\.(nc|txt|hdf5)$",
			"sampleFileName": "test_file.hdf5"
		}
	]
}
cml.create_collection(data=data)
new_collection
cml.list_collections(name="test", version="t0")<jupyter_output><empty_output><jupyter_text>Update Collection<jupyter_code>data = {
	"name": "test",
	"version": "t0",
	"provider_path": "/",
	"duplicateHandling": "skip",
	"granuleId": "^.*$",
	"granuleIdExtraction": "^(.*)",
	"sampleFileName": "test_file.nc",
	"files": [
		{
			"bucket": "public",
			"regex": "^(.*).*\\.cmr.xml$",
			"sampleFileName": "test_file.nc.cmr.xml"
		},
		{
			"bucket": "protected",
			"regex": "^(.*).*\\.(nc|txt|hdf5)$",
			"sampleFileName": "test_file.hdf5"
		}
	]
}
cml.update_collection(name="test", version="t0", data=data)<jupyter_output><empty_output><jupyter_text>Retrieve the updated field<jupyter_code>cml.list_collections(name="test", version="t0", fields="duplicateHandling")<jupyter_output><empty_output><jupyter_text>Delete Collection<jupyter_code>cml.delete_collection(name="test", version="t0")<jupyter_output><empty_output><jupyter_text>Check the collection was deleted<jupyter_code>cml.list_collections(name="test", version="t0", fields="duplicateHandling")<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.22330708661417323, 'fraction_numerical': 0.029921259842519685, 'mean_word_length': 7.871508379888268, 'pattern_counts': {'":': 28, '<': 32, '<?xml version=': 0, '>': 32, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 6}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '8', 'dir': 'jupyter-structured-clean-dedup', 'id': '40975', 'license': 'Apache-2.0', 'n_tokens_mistral': 1375, 'n_tokens_neox': 1266, 'n_words': 164, 'path': 'examples/Collections.ipynb', 'repo_name': 'lindsleycj/cumulus-api', 'size': '3175'}