Skip to main content

A Jupyter extension providing a TiTiler server, proxy, and a Python API to add Xarray datasets to the TiTiler server.

Project description

Jupyter Tiler

PyPI - Version PyPI - Downloads License ReadTheDocs Status Github Actions Status - Build Github Actions Status - Typecheck

[!IMPORTANT] This repository is experimental and in the prototype stage. Expect bugs. Expect a possible pivot and/or name change in the future :smile:

Your feedback and contributions are welcome! Please open an issue, DM Matt Fisher, or post in the #geojupyter channel on the Jupyter Zulip!

A Jupyter server extension which provides an API to launch a server to dynamically tile Xarray DataArrays for interactive visualization.

Who is this for?

Intended to be consumed by interactive map libraries for Jupyter, not end-users, e.g.:

What problem does this solve?

For authors of interactive map libraries for Jupyter, providing a dynamic HTTP tile server presents a unique problem: they don't know where Jupyter is running. It could be, for example, running on:

  • users' local machines
  • a shared JupyterLab instance on an intranet
  • an authenticated JupyterHub in a public cloud

The first case is the simplest; when the tile server is running on localhost, the map viewer running in JavaScript in the user's browser can connect to it.

In the other cases, the map viewer needs a public URL to connect to. The URL of the current JupyterHub instance may not be known. Additionally, a map server running in a Jupyter kernel isn't exposed to the public internet in many cases (for example, when it's running in a Kubernetes pod as part of a JupyterHub). This extension provides dynamic proxying to map servers running in the kernel.

Usage

As a Jupyter interactive map library author, you may implement a method like:

from jupyter_tiler.titiler import add_data_array


class MyMapLibrary:
  # ...

  def add_xarray_layer(self, da: xr.DataArray):
    # Add the layer to the tile server.
    # The server will be started the first time this is called.
    # A URL that passes through the Jupyter server proxy will be returned:
    url = add_data_array(da)

    # Add the layer to your map!
    self._add_tile_layer(url)

Install

Recommended:

uv add jupyter-tiler

Or:

[!WARNING] Installation with pixi/conda/mamba/micromamba is not yet supported. Please use another installation method!

pixi add jupyter-tiler

For other methods of installation, including pip, conda, mamba, and micromamba, see the installation instructions in the documentation.

From source

uv add git+https://github.com/geojupyter/jupyter-tiler.git#egg=jupyter-tiler

For development instructions, please view the development install instructions in our documentation's Contributor Guide!

Contributing

Please see the Contributor Guide in our documentation!

:rocket: Powered by...

TiTiler (Development Seed)

Other backends (e.g. xpublish-tiles (earthmover)) may be supported in the future!

:sparkles: Inspired by...

jupytergis-tiler by David Brochart

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

jupyter_tiler-0.8.1.tar.gz (234.9 kB view details)

Uploaded Source

Built Distribution

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

jupyter_tiler-0.8.1-py3-none-any.whl (22.5 kB view details)

Uploaded Python 3

File details

Details for the file jupyter_tiler-0.8.1.tar.gz.

File metadata

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

File hashes

Hashes for jupyter_tiler-0.8.1.tar.gz
Algorithm Hash digest
SHA256 f53dd5c56c7252f94fd138d5bfce470224c4dac7c66ef6e483d5d3892a865141
MD5 8f9e0ef7e1d37304ca04aba28b2c7e1f
BLAKE2b-256 232be5eaa7136ccc6d08e0e82bf18a892ce693191495c8499d0265af12aad2d0

See more details on using hashes here.

Provenance

The following attestation bundles were made for jupyter_tiler-0.8.1.tar.gz:

Publisher: publish.yml on geojupyter/jupyter-tiler

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

File details

Details for the file jupyter_tiler-0.8.1-py3-none-any.whl.

File metadata

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

File hashes

Hashes for jupyter_tiler-0.8.1-py3-none-any.whl
Algorithm Hash digest
SHA256 631eb063618c8afd1b1e08cc3b93258b27288272ae36929da8edaee9cd07c65d
MD5 d39768b916db859e161a6daf8edbdae0
BLAKE2b-256 93653c97517e9c7adab70b9a7cfa049f66abb3c606dcb7314c3bf8c3e0bcd92f

See more details on using hashes here.

Provenance

The following attestation bundles were made for jupyter_tiler-0.8.1-py3-none-any.whl:

Publisher: publish.yml on geojupyter/jupyter-tiler

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