Import library


In [ ]:
from pyCMR.pyCMR import CMR

Create an instance of the CMR class with the path to the config file. CMR class will request a token and write it to the config file you provide. Make sure the config file has the writing and reading permissions set.


In [ ]:
cmr=CMR("../cmr.cfg")

Ingest a collection


In [ ]:
cmr.ingestCollection("../pyCMR/tests/fixtures/test-collection.xml")

Ingest a granule


In [ ]:
cmr.ingestGranule("../pyCMR/tests/fixtures/test-granule.xml")