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.1.7.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.1.7-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: eratos_xarray-0.1.7.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.1.7.tar.gz
Algorithm Hash digest
SHA256 3c0efb9ddd53f4df3c6009e0c97d95b5e8c530187a1911becffd23f1c1088749
MD5 ff725e6a6110a9caaa889d37b1574625
BLAKE2b-256 40effaab55b5517a67cb9afdd14c9c22c315b52a276a04e74c1225f56b7a37b3

See more details on using hashes here.

Provenance

The following attestation bundles were made for eratos_xarray-0.1.7.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.1.7-py3-none-any.whl.

File metadata

  • Download URL: eratos_xarray-0.1.7-py3-none-any.whl
  • Upload date:
  • Size: 4.9 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.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 f65257e3ba180337ff650893224b28f186d0af8a38ed7a10938224dd0d8e4606
MD5 f2e7aaf742a6cd18ce47de19abdbcad8
BLAKE2b-256 055e23270616b3b6027b90af4586187cabf2bb21ac8c336674403e55fe62d579

See more details on using hashes here.

Provenance

The following attestation bundles were made for eratos_xarray-0.1.7-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