Skip to content

CLI - Implement MVP #11

@j08lue

Description

@j08lue

In our CCN1 proposal, we described the need for a CLI / Python client library:

2.19 User Client BB: CLI and Python library

2.19.1 Understanding of feature

The EOEPCA+ Command-Line Interface (CLI) and Python Client Library feature enhances the usability, accessibility, and automation potential of the EOEPCA+ ecosystem by providing lightweight, developer-oriented tools for interacting with the platform’s APIs. These tools will enable both interactive users and automated systems to seamlessly discover, access, and process Earth Observation data within EOEPCA+, without requiring deep familiarity with the underlying service endpoints or manual management of authentication tokens.

The feature comprises two closely related components — a Python client library and a command-line interface (CLI) — both designed to simplify interaction with EOEPCA+’s federated services. The Python library will serve as the foundational layer, exposing a unified, object-oriented interface that wraps all EOEPCA+ APIs, including those for authentication, data discovery, catalogue search, data access, processing, and user management. By installing the package via a simple command (e.g., pip install eoepca-client), users will gain programmatic access to the platform’s full functionality within Python environments, including Jupyter notebooks and automated pipelines.

The CLI will build directly upon this Python library, providing terminal-based commands for performing the same operations from the command line. It will support actions such as authenticating a user, querying catalogues, ordering data, submitting processing jobs, monitoring progress, and managing resources. The CLI will handle authentication transparently, automatically invoking the EOEPCA Identity and Access Management (IAM) services to obtain, refresh, and apply OAuth2 or OpenID Connect tokens. This removes the need for users to manually manage access tokens or client credentials, significantly reducing entry barriers and potential configuration errors.

Together, these tools serve two complementary user groups. The CLI is targeted at power users and operators, who require a fast and consistent interface for scripting tasks or managing services directly from the terminal. The Python client library, on the other hand, targets developers, data scientists, and integrators, enabling them to embed EOEPCA+ functionality within their own applications, notebooks, and workflows. Both components will follow the same design principles and codebase, ensuring consistency in behavior, error handling, and authentication across interfaces.

To support user adoption and reproducibility, the Python package will include example notebooks demonstrating common workflows such as data search and retrieval, on-demand ordering, and processing job submission. These examples will illustrate how to integrate EOEPCA+ capabilities into custom scripts and pipelines, promoting uptake among research and operations communities.

2.19.2 Use cases for feature

  • As a platform user, I want to use a single library or command line tool to interact with the platform ser-vices.
  • As an operator, I want to provide easy-to-use tools for platform users to interact with the platform ser-vices that especially hides the complexity of authentication workflows as well as REST-based APIs.
  • As a registered platform user, I need to complete authentication and authorisation flows as part of my interactive Python-based data analysis, so I can access restricted or user-private resources.
  • As a platform user, I would like to get an overview of available platform services, such that I can find the resources I need.

2.19.3 Implementation of feature

A review of the existing EOEPCA demo notebooks and docs will reveal the tasks around platform services that are repetitive, cumbersome, and can be classified as boilerplate. Together with building block developer teams and potentially with champion users from existing platforms, we will design and develop an EOEPCA Python client library that eases or automates these tasks, while not replicating existing community-maintained clients.

Tasks:

  • Documentation of common platform-specific tasks in user code workflows and prioritised list of tasks to include in CLI/client
  • Concept and initial development of eoepca-client library and CLI
  • CLI subcommands for resource discovery client - Integration with OWSLib
  • CLI subcommands for resource registration client
  • Showcase how Python library can be integrated into own platform-specific library

In the last quarter, we refined the use cases further, informed by the user needs on DLR's terrabyte platform:

Acceptance criteria

  • Identified priority features (MVP)
  • Implemented MVP
  • Prepared docs and demo

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions