09 — Updating the catalogue
Each xeo release includes a local snapshot of the Awesome Earth Observation Instruments catalogue. Catalogue.update() downloads the current catalogue from GitHub and uses it when it changed after the local one, as recorded in xeo.catalogue.updated.
Before updating
Updating requires an internet connection. The downloaded catalogue is saved in the per-user cache directory (or in XEO_CACHE_DIR when set), not in the installed package. Later imports load the newest of the saved and the bundled catalogue, so upgrading xeo is never overridden by an older download. Updating does not change the installed xeo package version.
import xeo
print(f"xeo version: {xeo.__version__}")
print(f"Catalogue version before update: {xeo.catalogue.version}")
print(f"Catalogue last changed: {xeo.catalogue.updated}")
print(f"Number of instruments: {len(xeo.instruments)}")Download the current catalogue
The method reports whether the local catalogue was already up to date or was updated.
instruments = xeo.instruments
xeo.catalogue.update()Continue in the current session
A successful update refreshes the catalogue and shared instrument collection immediately. There is no need to restart Python or import xeo again.
print(f"Catalogue version after update: {xeo.catalogue.version}")
print(f"Catalogue last changed: {xeo.catalogue.updated}")
print(f"Number of instruments: {len(xeo.instruments)}")
print("Shared collection preserved:", instruments is xeo.instruments)