Skip to main content

API to harmonised data access for DIAS/WEkEO

Project description

WEkEO HDA API Client

This package provides a fully compliant Python 3 client that can be used to search and download products using the Harmonized Data Access WEkEO API.

HDA is RESTful interface allowing users to search and download WEkEO datasets.

Documentation about its usage can be found at https://www.wekeo.eu/.

Requirements

  • Python 3
  • requests
  • tqdm

Installation

Clone the repository into a folder on your computer and install it, either as a global package or in a virtualenv:

python setup.py install

This will also install the required dependencies.

Finally, create a .hdarc file into your home directory copying and adapting the following template with the credentials of your WEkEO account:

url: https://wekeo-broker.apps.mercator.dpi.wekeo.eu/databroker
user: [username]
password: [password]

Basic Usage

The client can be used directly into another python script as in the following example:

from hda import Client

c = Client(debug=True)

query = {
    "datasetId": "EO:CODA:DAT:SENTINEL-3:OL_1_EFR___",
    "dateRangeSelectValues": [{
        "end": "2019-07-03T14:03:00.000Z",
        "name": "dtrange",
        "start": "2019-07-03T13:59:00.000Z"
    }],
    "stringChoiceValues": []
}
matches = c.search(query)
print(matches)
matches.download()

Note that the query must be json valid object. Please refer to the official documentation of the HDA for instructions on how to get the list of the available parameters.

Alternatively, it can be wrapped into a script to be executed from the command line. Please refer to the demos/demo.py file for a simple demostration.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hda-0.2.1.tar.gz (6.5 kB view details)

Uploaded Source

File details

Details for the file hda-0.2.1.tar.gz.

File metadata

  • Download URL: hda-0.2.1.tar.gz
  • Upload date:
  • Size: 6.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.0.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.7

File hashes

Hashes for hda-0.2.1.tar.gz
Algorithm Hash digest
SHA256 bdaf06c91b46332d85fa776e3662edf77a726962ba8315cd20aecee4e82e98d3
MD5 8bcf16ec8ed677d22a2a872cc640210b
BLAKE2b-256 45250f7ab1b70121748b9b939b20c0739a67e3114bab3d25e05fdbfd322d35c4

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page