anyupset
Interactive UpSet plots as an anywidget, for marimo and Jupyter.
An UpSet plot shows how items are distributed across combinations of sets. The point of this one is seeing the actual items: hover any bar and its members appear in the side panel; click to pin the selection and pull it back into Python.
Install
uv add anyupset
Use
from anyupset import UpSet
upset = UpSet({
"drama": {"Titanic", "Casablanca", "Whiplash"},
"romance": {"Titanic", "Casablanca", "Notting Hill"},
"comedy": {"Notting Hill"},
})
upset
Columns are exclusive intersections: each item belongs to exactly one column, the one matching the full set of sets it is in.
Data often arrives the other way round — one row per item, listing what it
belongs to. from_memberships flips it for you, and builds the same plot:
upset = UpSet.from_memberships({
"Titanic": ["drama", "romance"],
"Casablanca": ["drama", "romance"],
"Whiplash": ["drama"],
"Notting Hill": ["romance", "comedy"],
})
Reading the selection
upset.selected_sets # ['drama', 'romance']
upset.selected_members # ['Casablanca', 'Titanic'] — original Python objects
upset.selected_values # the same, reduced to JSON-safe scalars
In marimo, wrap it so downstream cells re-run on interaction:
upset = mo.ui.anywidget(UpSet(...))
upset.value["selected_sets"] # ['drama', 'romance']
upset.value["selected_values"] # ['Casablanca', 'Titanic']
.value carries only synced traits. selected_members is deliberately not
synced — it holds the original objects, uncapped, and never crosses the wire —
but the wrapper proxies attribute access, so upset.selected_members still
works. Use .value for reactivity, the attribute when you need fidelity.
Examples
Both demos build the same plot from the same 156-film dataset.
# marimo — reactive: clicking a bar re-runs the cells below it
uv run --group dev marimo edit examples/marimo_demo.py
# Jupyter — re-run the reading cell yourself after clicking
uv run --group jupyter jupyter lab examples/jupyter_demo.ipynb
Metadata
Release files for anyupset 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| anyupset-0.1.0.tar.gz | 13.9 kB | Without provenance | Details for anyupset-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| anyupset-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for anyupset-0.1.0-py3-none-any.whl |
Total release size: 29.3 kB
Release files / anyupset-0.1.0.tar.gz
| Download URL | anyupset-0.1.0.tar.gz |
|---|---|
| Size | 13.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
006977577431ef30bfbe5e8211cffe6ad681c464f4f7b7e975e8177da7355b79
|
|
BLAKE2b-256 checksum How to use checksums |
fbc8590a84faad3ee7fe521a6ad833907b725a3a29b27a4ae9c46f38ad96f83c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / anyupset-0.1.0-py3-none-any.whl
| Download URL | anyupset-0.1.0-py3-none-any.whl |
|---|---|
| Size | 15.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
00b50ba267cd181350c6bbf11824c85d38828eb4a424a35f8cea7c461bf3013c
|
|
BLAKE2b-256 checksum How to use checksums |
4f4f97f3ac4b5505bad96e195db19919a71eccdba61def545c39da38408037f5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for anyupset 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.