Xpublish#

Useful links: Installation | Source Repository | Issue Tracker | Q&A Support | Slack Channel

PyPI Conda PyPI - Python Version Binder

GitHub Workflow Status Documentation Status pre-commit.ci status

Xpublish is#

A quick way to serve a single Xarray Dataset or DataTree over HTTP using FastAPI

Get started with ds.rest.serve() or dt.rest.serve() to explore serving flat or hierarchical data with Xpublish

getting-started/tutorial/introduction
An extendable core of a dataset server

By building a server around Xarray’s Dataset and DataTree types, we can build on top of the rapid progress of Xarray and the greater PyData ecosystem — including native support for hierarchical Zarr/Icechunk data.

getting-started/why-xpublish
A community and ecosystem of plugins, servers, and their builders and users

Explore the Xpublish ecosystem.

ecosystem/index

I want to#

Getting started

New to Xpublish? Check out the getting started guides. They contain an introduction to Xpublish’s main concepts.

Getting started
User guide

The user guide contains in-depth information on the key concepts of Xpublish with useful background information and explanation.

User Guide
API Reference

The reference guide contains a detailed description of the Xpublish API/ The reference describes how the methods work and which parameters can be used. It assumes that you have an understanding of the key concepts.

API reference
Developer guide

Saw a typo in the documentation? Want to improve existing functionalities? The contributing guidelines will guide you through the process of improving Xpublish.

Contributing to Xpublish

A quick intro#

You can run a short example application in a live session here: Binder

On the server-side, one or more datasets or DataTrees can be published using the xpublish.Rest class, the xarray.Dataset.rest accessor, or the xarray.DataTree.rest accessor, e.g.,

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)

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.

Feedback#

If you encounter any errors or problems with Xpublish, please open an issue on GitHub, or ask questions in Github Discussions or on our Slack Channel.