Skip to main content

Introduction

The EarthCODE Library is a Python package developed to support the creation, validation, and search of Open Science Catalog metadata within the EarthCODE publishing workflow. It provides a shared implementation layer for catalog-related operations, reducing the need for project teams and platforms to maintain separate, ad hoc approaches for generating and checking metadata. This repository includes the core package, a command-line interface, usage examples, publication guides, and a test suite, This repository provides Python tools for creating, validating, and searching EarthCODE Open Science Catalog metadata.

Documentation on usage and guides is maintained at: https://esa-earthcode.github.io/earthcode-library/README.html

1. Installation

pip install earthcode

Requirements

The minimum required Python version if you would like to install the library locally is 3.12

2. Quick start

# 1. Import the library
import earthcode

# 2. Search through the catalog
from earthcode.search import search

# 3. Search through semantix text
# Here we take as an example the search done by semantix text and search the catalog via the collection.id which is known
search(collection_ids="seasfire-cube")[0]

# 4. Filter the products in the catalog
search("global chlorophyll dataset", variable=chlorophyll.id, type="products", mission="sentinel-3")

3. How to contribute to Open Science Catalogue? 

With earthcode library creating new entries in the catalogue is semi-automatic. Please find step by step instructions in the docs/ folder. Start by going through the docs/contributing_to_the_osc document.

4. Search through Open Science Catalogue

In the examples/ folder you can find notebooks that show:

  • How to use the library to semantically search the Open Science Catalog - examples/earthcode_data_discovery.ipynb

Looking for support?

We are ready to assist you in case you have any questions/found a bug or mistake, please use GitHub Issues to open a ticket!
Alternatively contact the team via e-mail: earthcode@esa.int

If you would like to request a specific feature, or any question to the community of Earthcode and library developers, please use the EarthCODE discourse Technical Support channel

Development

If you want to contribute a feature to the library you are welcome to contribute via pull request. First, fork this repository; then make your suggested change and open a PR against this repo. Make sure to add tests for any new functionality.

Local install

  1. git clone https://github.com/ESA-EarthCODE/earthcode-library.git
  2. Install pixi - https://pixi.sh/dev/installation/
  3. cd earthcode-library
  4. pixi install
  5. pixi run jupyter lab

You can run tests through pixi run pytest. If running on Windows use pixi run pytest --basetemp=C:\t to avoid long path errors, since some of the project names are >260 chars.

To publish a realease

Edit pyproject.toml to 1.1.4 and run

  • pixi lock
  • git add pyproject.toml pixi.toml pixi.lock
  • git commit -m "Release v1.1.4"
  • git push origin main
  • git tag -a v1.1.4 -m "Release v1.1.4"
  • git push origin v1.1.4

Metadata

Release files for earthcode 0.1.9

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for earthcode 0.1.9
File Size Uploaded Provenance Actions
earthcode-0.1.9.tar.gz 1.2 MB With provenance Details for earthcode-0.1.9.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for earthcode 0.1.9
File Interpreter ABI Platform Actions
earthcode-0.1.9-py3-none-any.whl Python 3 none any Details for earthcode-0.1.9-py3-none-any.whl

Total release size: 1.3 MB

Release files / earthcode-0.1.9.tar.gz

Download URL earthcode-0.1.9.tar.gz
Size 1.2 MB
Tags Source
SHA-256 checksum
How to use checksums
084a30a00e3a4d89213a06a48f95f5dc9b7cab8037faa0b4d23f43129a143505
BLAKE2b-256 checksum
How to use checksums
c20202f96da228440d175c239a5344be392c3602a85bafb94b0ce545c00c1430
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 26, 2026.

Transparency log

Release files / earthcode-0.1.9-py3-none-any.whl

Download URL earthcode-0.1.9-py3-none-any.whl
Size 60.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c030f47348d5de79a027b6078df26c923a7254a592348702145b17c35b0a69ce
BLAKE2b-256 checksum
How to use checksums
72350cfd35310b43946a577f4dddfcd53b8656677ee63b46e762e484776fc5e6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 26, 2026.

Transparency log

Security for earthcode 0.1.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for earthcode-0.1.9.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 26, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page