Xpublish#
Useful links: Installation | Source Repository | Issue Tracker | Q&A Support | Slack Channel
Xpublish is#
Get started with ds.rest.serve()
to explore serving data with Xpublish
By building a server based around Xarray datasets, we can build on top of the rapid progress of Xarray and the greater PyData ecosystem.
Explore the Xpublish ecosystem.
I want to#
Serve a collection of datasets with pre-configured server
New to Xpublish? Check out the getting started guides. They contain an introduction to Xpublish’s main concepts.
The user guide contains in-depth information on the key concepts of Xpublish with useful background information and explanation.
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 an understanding of the key concepts.
Saw a typo in the documentation? Want to improve existing functionalities? The contributing guidelines will guide you through the process of improving Xpublish.
A quick intro#
You can run a short example application in a live session here:
On the server-side, one or more datasets can be published using the
xpublish.Rest
class or the xarray.Dataset.rest
accessor, e.g.,
ds.rest.serve(host="0.0.0.0", port=9000)
The published datasets can be accessed from various kinds of client applications, e.g., from within Python using Zarr and fsspec.
import xarray as xr
import zarr
from fsspec.implementations.http import HTTPFileSystem
fs = HTTPFileSystem()
http_map = fs.get_mapper("http://0.0.0.0:9000/zarr/")
# open as a zarr group
zg = zarr.open_consolidated(http_map, mode="r")
# or open as another Xarray Dataset
ds = xr.open_zarr(http_map, consolidated=True)
Or to explore other access methods, 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.