Skip to main content

Xarray backend for Eratos SDK

Project description

Xarray support for Eratos SDK

Provides an Xarray backend for Eratos SDK (<www.eratos.com>). The backend supports lazy loading remote datasets.

Usage

Gridded datasets may be opened in xarray by passing in a valid ERN to the path argument and then supplying either an Eratos credentials object to eratos_auth or an Eratos adapter object to eratos_adapter.

See below for a minimal example to open the SILO maximum temperature dataset.

from eratos.creds import AccessTokenCreds
import xarray as xr

eratos_id = 'ENTER YOUR ERATOS ID'
eratos_secret = 'ENTER YOUR ERATOS SECRET KEY'

ecreds = AccessTokenCreds(eratos_id, eratos_secret)
silo = xr.open_dataset('ern:e-pn.io:resource:eratos.blocks.silo.maxtemperature', eratos_auth=ecreds)

print(silo)

alternatively an initialised adapter object can be passed through. This is useful to reuse the same session.

from eratos.creds import AccessTokenCreds
from eratos.adapter import Adapter
import xarray as xr

eratos_id = 'ENTER YOUR ERATOS ID'
eratos_secret = 'ENTER YOUR ERATOS SECRET KEY'

ecreds = AccessTokenCreds(eratos_id, eratos_secret)
adapter = Adapter(ecreds)
silo = xr.open_dataset('ern:e-pn.io:resource:eratos.blocks.silo.maxtemperature', eratos_adpater=adapter)

print(silo)

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

eratos_xarray-0.2.0.tar.gz (3.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

eratos_xarray-0.2.0-py3-none-any.whl (5.0 kB view details)

Uploaded Python 3

File details

Details for the file eratos_xarray-0.2.0.tar.gz.

File metadata

  • Download URL: eratos_xarray-0.2.0.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for eratos_xarray-0.2.0.tar.gz
Algorithm Hash digest
SHA256 3495b742db9322df16c9a333cec73f1ed3c252e8cd7c347e7a7e6a67438e93a5
MD5 11d1f3715a5d5a669f602469c519b6a9
BLAKE2b-256 fffe3a7dc571ceaaf764dfe9ef79900d4b3d6248f3fd280e69f6e42a7bb23eb6

See more details on using hashes here.

Provenance

The following attestation bundles were made for eratos_xarray-0.2.0.tar.gz:

Publisher: CD-Release-Prod.yml on eratosio/eratos-xarray

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file eratos_xarray-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: eratos_xarray-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 5.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for eratos_xarray-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b73631ff5c0086216b59e979c40205a6e8ce3523054d82d864a4d74084713a1e
MD5 19b5b70a2b8e4af47462e29138ccd035
BLAKE2b-256 4b9b61bfee3374f65b2eade36f1a4c0b29203384388e02d3a94f73d2ae6984d6

See more details on using hashes here.

Provenance

The following attestation bundles were made for eratos_xarray-0.2.0-py3-none-any.whl:

Publisher: CD-Release-Prod.yml on eratosio/eratos-xarray

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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