Skip to main content

Publish Xarray Datasets via a REST API.

Project description

Xpublish

Publish Xarray Datasets and DataTrees to the web

PyPI Conda PyPI - Python Version Binder

GitHub Workflow Status Documentation Status pre-commit.ci status

A quick example

Serverside: Publish an Xarray Dataset or DataTree through a REST API

ds.rest.serve(host="0.0.0.0", port=9000)
# or, for a hierarchical DataTree, the API is identical:
dt.rest.serve(host="0.0.0.0", port=9000)

Client-side: Connect to a published dataset

The published datasets can be accessed from various kinds of client applications, including any HTTP client. To explore the available endpoints, open http://0.0.0.0:9000/docs in a browser.

Why?

Xpublish lets you serve/share/publish Xarray Datasets and DataTrees via a web application.

The data and/or metadata can be exposed in various forms through pluggable REST API endpoints. Hierarchical data is supported natively — bare Datasets are wrapped in a single-node DataTree internally so the same routes, accessors, and plugins work whether you're serving a flat dataset or a deeply nested tree. Efficient, on-demand delivery of large datasets may be enabled with Dask on the server-side.

Xpublish's plugin ecosystem has capabilities including:

  • publish on-demand or derived data products
  • turning xarray objects into streaming services (e.g. OPeNDAP)
  • Zarr-compatible access via xpublish-zarr

How?

Under the hood, Xpublish is using a web app (FastAPI) that is exposing a REST-like API with builtin and/or user-defined endpoints. Additional endpoints can be added by installing or writing plugins.

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

xpublish-0.5.1.tar.gz (24.4 kB view details)

Uploaded Source

Built Distribution

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

xpublish-0.5.1-py3-none-any.whl (30.0 kB view details)

Uploaded Python 3

File details

Details for the file xpublish-0.5.1.tar.gz.

File metadata

  • Download URL: xpublish-0.5.1.tar.gz
  • Upload date:
  • Size: 24.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for xpublish-0.5.1.tar.gz
Algorithm Hash digest
SHA256 3fcaa76380cd638902d063bbd78e0e025bf36222a1fb44cbc59bd2b456525ded
MD5 9530fec96b572cf171526bda245883b3
BLAKE2b-256 9d0b97414521c19e11101bf1d0f86fb8861ac5ba3597714b6716ea5f8b9d691d

See more details on using hashes here.

Provenance

The following attestation bundles were made for xpublish-0.5.1.tar.gz:

Publisher: pypipublish.yaml on xpublish-community/xpublish

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

File details

Details for the file xpublish-0.5.1-py3-none-any.whl.

File metadata

  • Download URL: xpublish-0.5.1-py3-none-any.whl
  • Upload date:
  • Size: 30.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for xpublish-0.5.1-py3-none-any.whl
Algorithm Hash digest
SHA256 086484aa26ce087e6df81ec400662f4d59a310b88dbf7c914e0b0d8e046ecba1
MD5 821397a0b845c3251dee3566ae560a10
BLAKE2b-256 1f62d196654633e5158f38444d0facc38ab3c6d8b34061e76d3520e73c4da266

See more details on using hashes here.

Provenance

The following attestation bundles were made for xpublish-0.5.1-py3-none-any.whl:

Publisher: pypipublish.yaml on xpublish-community/xpublish

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