Skip to content

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/

License

Notifications You must be signed in to change notification settings

MrChebur/usgs-machine-to-machine-API

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

55 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Image Simple Python wrapper of the USGS/EROS Inventory Service Machine-to-Machine API as described in the documents.


UPDATE 2024.12.06

  • All USGS methods, data types and errors are now consistent with the USGS API.
  • All USGS data types are now classes. Use .dict to convert them to a dictionary.
  • Type hits added to USGS methods and data types.
  • The old USGS 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

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
# }

See more usage example here.


About

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/

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages