Skip to main content

vitessce-python

PyPI docs

Binder Open In Colab Open in molab

Python API and Jupyter widget facilitating interactive visualization of spatial single-cell data with Vitessce.

Installation

To install with pip:

$ pip install 'vitessce[all]'

Getting started

Explore our example notebooks. These contain demos of different use cases and integrations with single-cell data analysis packages.

Development

For a development installation (requires NodeJS and NPM),

$ git clone https://github.com/vitessce/vitessce-python.git
$ cd vitessce-python
$ uv sync --extra dev --extra docs --extra all

Alternatively, use conda:

$ conda create -n vitessce-dev python=3.12
$ conda activate vitessce-dev
$ pip install -e ".[dev,docs,all]"

Troubleshooting SpatialQuery installation on macOS:

$ # Use the macOS clang instead of from homebrew.
$ CC=/usr/bin/clang CXX=/usr/bin/clang++ pip install -e ".[dev,docs,all,sq]"

Linting and testing

uv run flake8
uv run pytest

Formatting

One file:

uv run autopep8 --in-place --aggressive ./path/to/file.py

All .py files:

find . -name '*.py' -exec uv run autopep8 --in-place --aggressive '{}' \;

Documentation

uv run make html

Deployment

To deploy a new version, increment the version of the Python package in pyproject.toml.

Then, when you push or merge the code with the incremented versions to main, the GitHub Action deploy.yml workflow will build and push the package to PyPI.

Troubleshooting

Check JavaScript console

Check the JavaScript console in the web browser for error messages. To do so, shift+right click in Jupyter, then click Inspect element. You may need to enable your browser's develop mode in its preferences for this option to appear when you right-click.

Check your Python environment

Check that you have activated the correct conda or other virtual environment as you expect. When sharing errors, it can be helpful to share the current versions of packages in the environment, e.g., by conda list or pip list.

Restart Kernel and Clear All Outputs, then refresh the browser tab

To ensure that older widget JavaScript output is not causing conflicts with newer JavaScript output (which may persist via notebook outputs even without running notebook cells), clear old outputs by Kernel -> Restart Kernel and Clear All Outputs. Then refresh the browser tab (containing Jupyter) to ensure all JavaScript outputs are fresh.

This is also typically required when running !pip install vitessce[all] from within a Jupyter notebook cell in the same session as running vc.widget() for the first time. The Kernel restart/Output clearing is required when a new Jupyter widget is installed in the environment, otherwise Jupyter will not yet recognize the newly-installed widget (as the notebook was opened with a different set of Jupyter widgets installed, and widget discovery is performed only at certain stages in the notebook lifecycle).

Check the widget configuration

If the widget renders successfully, you can get its current configuration by

vw = vc.widget()
vw
vw.config

Usage when Jupyter is running on a remote machine

If Jupyter is running on a remote machine, then use proxy=True. You may need to specify host_name as well (widget should be able to detect this but the plain display cannot).

vw = vc.widget(proxy=True)
vw

or

vc.display(proxy=True, host_name="http://localhost:8888")

For more information see the data location options documentation.

Ensure that Vitessce and Jupyter are installed in the same environment

With the environment activated, run pip list on the command line:

Package                       Version
----------------------------- -----------
...
jupyterlab                    3.x.x
...
vitessce                      3.x.x

Resources

Getting/Offering Help

If you have a specific bug or feature request, please feel free to open an issue. Otherwise our discussions section is a great place to get help or offer it. If you aren't sure if something is a bug or not, don't have all the reproduction steps, or just have a general question, feel free to open a discussion post.

Release files for vitessce 3.9.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for vitessce 3.9.7
File Size Uploaded
vitessce-3.9.7.tar.gz 262.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for vitessce 3.9.7
File Interpreter ABI Platform
vitessce-3.9.7-py3-none-any.whl Python 3 none any Details

Total release size: 349.6 kB

Release files / vitessce-3.9.7.tar.gz

Download URL vitessce-3.9.7.tar.gz
Size 262.7 kB
Tags Source
SHA-256 checksum
How to use checksums
e142d45e0bd56159972a43763313ebc463e4b09d10c5a680b223afb80e040f4f
BLAKE2b-256 checksum
How to use checksums
4f8b5e6a8a06082886a4d8c9ba1d68ae756a25d3044e88e44f2a481fa7de8cfd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / vitessce-3.9.7-py3-none-any.whl

Download URL vitessce-3.9.7-py3-none-any.whl
Size 86.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f33b14c4b1fd3b83545a32c0701a1616f0da8997e54cc84f5128f8c7e35929d3
BLAKE2b-256 checksum
How to use checksums
076bfc1f1fff0fe6e4ab085510b0bff19d32c76c62070c00c416a9fd85465228
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release history Release notifications | RSS feed

This release

3.9.7 This release

2 release files

3.9.6

2 release files

3.9.5

2 release files

3.9.4

2 release files

3.9.3

2 release files

3.9.2

2 release files

3.9.1

2 release files

3.9.0

2 release files

3.8.4

2 release files

3.8.3

2 release files

3.8.2

2 release files

3.8.1

2 release files

3.8.0

1 release file

3.7.9

1 release file

3.7.8

1 release file

3.7.7

2 release files

3.7.6

2 release files

3.7.5

2 release files

3.7.4

2 release files

3.7.3

2 release files

3.7.2

2 release files

3.7.1

2 release files

3.7.0

2 release files

3.6.9

2 release files

3.6.8

2 release files

3.6.7

2 release files

3.6.6

2 release files

3.6.5

2 release files

3.6.4

2 release files

3.6.3

2 release files

3.6.2

2 release files

3.6.1

2 release files

3.6.0

2 release files

3.5.9

2 release files

3.5.8

2 release files

3.5.7

2 release files

3.5.6

2 release files

3.5.5

2 release files

3.5.4

2 release files

3.5.3

2 release files

3.5.2

2 release files

3.5.1

2 release files

3.5.0

2 release files

3.4.3

3 release files

3.4.2

2 release files

3.4.1

2 release files

3.4.0

2 release files

3.3.5

2 release files

3.3.4

2 release files

3.3.3

2 release files

3.3.2

2 release files

3.3.1

2 release files

3.3.0

2 release files

3.2.8

2 release files

3.2.7

2 release files

3.2.6

2 release files

3.2.5

2 release files

3.2.4

2 release files

3.2.3

2 release files

3.2.2

2 release files

3.2.1

2 release files

3.2.0

2 release files

3.1.1

2 release files

3.1.0

2 release files

3.0.7

2 release files

3.0.6

2 release files

3.0.5

2 release files

3.0.4

2 release files

3.0.3

2 release files

3.0.2

2 release files

3.0.1

2 release files

3.0.0

2 release files

2.0.1

2 release files

1.0.11

2 release files

1.0.9

2 release files

1.0.8

2 release files

1.0.7

2 release files

1.0.6

2 release files

1.0.5

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page