Loading repository data…
Loading repository data…
MrChebur / repository
Simple Python wrapper of the USGS/EROS Inventory Service Machine-to-Machine API as described in the documents at https://m2m.cr.usgs.gov/api/docs/json/
Simple Python wrapper of the USGS/EROS Inventory Service Machine-to-Machine API as described in the documents.
UPDATE 2024.12.06
.dict to convert them to a dictionary.login method will be deprecated in February 2025 (a warning has been added).[!IMPORTANT]
You must have machine-to-machine access to execute queries. You can order access here.
INSTALLATION
pip install https://github.com/MrChebur/usgs-machine-to-machine-API/archive/master.zip
CODE EXAMPLES
See another code example here.
from usgs_m2m.usgsMethods import API as M2M
api = M2M()
api.loginToken('usgs_username', 'usgs_token')
permissions = api.permissions()
print(permissions)
# {
# 'requestId': '00000000',
# 'version': 'stable',
# 'sessionId': '00000000',
# 'data': ['user', 'download', 'order'],
# 'errorCode': None,
# 'errorMessage': None
# }