lsru.Usgs

class lsru.Usgs(version='stable', conf='/home/docs/.lsru')[source]

Interface to the Usgs API

See documentation of the search method for basic usage

Parameters:
  • version (str) – API version to use, defaults to 'stable'
  • conf (str) – Path of the configuration file containing usgs login credentials
USER

Usgs username

Type:str
PASSWORD

Usgs password

Type:str
endpoint

API endpoint

Type:str
key

API key. Required to perform a search and obtained by running the login() method

Type:str
key_dt

Time at which the key was generated

Type:datetime.datetime
__init__(version='stable', conf='/home/docs/.lsru')[source]

Initialize self. See help(type(self)) for accurate signature.

Methods

__init__([version, conf]) Initialize self.
get_collection_name(num) Get Earth Explorer Landsat collection names
login() Login to the Usgs api
search(collection, bbox[, begin, end, …]) Perform a spatio temporal query on Landsat catalog

Attributes

key_age Determines the age of API key