What is pyeodh?
Description & purpose: A Python API client has been produced by Oxidian to allow simplified, yet powerful, access to the EODH API endpoints. This Notebook introduces the API client.
Author(s): Alastair Graham
Date created: 2024-11-08
Date last modified: 2024-12-19
Licence: This file is licensed under Creative Commons Attribution-ShareAlike 4.0 International. Any included code is released using the BSD-2-Clause license.
Copyright (c) , All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Introduction
As part of the EODH project, pyeodh
has been created. This is a lightweight Python client for easy access to EODH APIs.
An API client is a software tool or library designed to simplify interactions between a user’s application and an external API (Application Programming Interface). In the case of pyeodh
, it is a Python-based tool tailored to facilitate communication with the specific API endpoints exposed by the EODH platform. Using pyeodh
, developers and scientists can programmatically access the API’s features—such as sending requests, retrieving data, or executing commands—without needing to handle the underlying details such as crafting HTTP requests or managing authentication manually.
By abstracting these complexities, ‘pyeodh’ makes it easier to integrate the API into Python applications, enabling developers to focus on building features rather than managing low-level networking tasks.
Why is pyeodh needed?
A key group of expected users are data scientists, and the key tools for this group tend to be written in Python. The pyeodh
API client will simplify the interaction with the EODH platform allowing for more rapid, frictionless scientific development.
Before you start
Access to the EODH platform is largely free and open. However, in order to complete tasks on the workflow runner (WR) you will require an API token. To generate the token you will require a user account whch can be requested by contacting enquiries@eodatahub.org.uk
. Once you have the account, login and navigate to ‘Workspaces’. Under the ‘Applications’ tab click on the ‘DataHub’ as shown in the screenshot below. From there you will be able to generate a new API token and manage other tokens that you have access to.