treescope
Treescope: An interactive HTML pretty-printer for ML research in IPython notebooks.
Decision gist · record as of 2026-08-14
Yes. Treescope is actively maintained, has no security issues, installs with minimal friction, and solves a real pain point for ML researchers working in notebooks. The permissive license poses no restrictions. Install it if you spend time inspecting complex objects or tensors in IPython notebooks.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.10 or later and an IPython notebook environment.
- Low friction: pure Python wheel with only numpy as a runtime dependency.
- Actively maintained with recent commits and no known vulnerabilities.
License · maintenance · safety
permissive license (permissive) — Permissive license allows commercial and private use with minimal restrictions.
last release 2025-08-08 (371 days) · last repo commit 2026-06-18 · 475 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 3,006,234 downloads/mo, #2,790 on PyPI
Alternatives
Verify before relying
pip install treescope
import treescope
treescope.basic_interactive_setup(autovisualize_arrays=True)
# Then use treescope.show(object) or treescope.register_as_default()- Whether treescope works with non-notebook Python environments or only in interactive notebooks.
- Performance characteristics when rendering very large or deeply nested objects.
- Compatibility with specific versions of Jupyter or Colab beyond the general IPython requirement.
What it is and what it does
Treescope is a specialized pretty-printer for machine learning research that replaces IPython's default object renderer with an interactive HTML visualization. Instead of flat text output, it renders objects as expandable trees where you can click to drill into nested structures, automatically visualizes multi-dimensional arrays with shape and value distribution information, and adds features like copy-path buttons and type inspection mode. It was originally built for the Penzai neural network library but also works with other frameworks and plain numpy code.
The package depends only on numpy and installs as a pure Python wheel, making it lightweight and easy to add to existing notebooks. It's designed as a drop-in replacement—you can either call treescope.show() on specific objects or register it globally to replace the notebook's default renderer. Configuration options let you control verbosity and abbreviation depth, and the package is actively maintained with no known security vulnerabilities.
Use it for
- Inspecting large neural network model structures in notebooks to understand layer hierarchies and parameter sharing.
- Visualizing high-dimensional tensor shapes and value distributions without leaving the notebook.
- Debugging complex nested data structures by expanding only the parts you care about.
- Quickly copying qualified paths to specific fields in rendered objects for use in code.
- Rendering models from multiple frameworks with consistent interactive visualization.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
Treescope is actively maintained, has no security issues, installs with minimal friction, and solves a real pain point for ML researchers working in notebooks. The permissive license poses no restrictions. Install it if you spend time inspecting complex objects or tensors in IPython notebooks.
Install
treescope on PyPI
Before you install
Low friction: pure Python wheel with only numpy as a runtime dependency. Actively maintained with recent commits and no known vulnerabilities.
Requires Python 3.10 or later and an IPython notebook environment.
License in practice
Permissive license allows commercial and private use with minimal restrictions.
Quickstart
pip install treescope
import treescope
treescope.basic_interactive_setup(autovisualize_arrays=True)
# Then use treescope.show(object) or treescope.register_as_default()
Verify before relying
- Whether treescope works with non-notebook Python environments or only in interactive notebooks.
- Performance characteristics when rendering very large or deeply nested objects.
- Compatibility with specific versions of Jupyter or Colab beyond the general IPython requirement.
Package facts
| License | permissive license permissive |
| Python support | Supports the current Python release >=3.10 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 1 packagenumpy |
| Maintenance | Actively maintained 371 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 3,006,234 / month, #2,790 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Intended Audience :: Science/ResearchLicense :: OSI Approved :: Apache Software LicenseProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: Only |
Evidence: treescope-0.1.10-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “interactive pretty printer jupyter”
- treescopeTreescope is an interactive HTML pretty-printer and tensor visualizer…
- prettyprinterSyntax-highlighted, declarative pretty printer for Python that…
- pretty-errorsReformats Python exception tracebacks with color, context, and…
Give your agent the search over MCP, or paste the wish link into any chat.
More Artificial Intelligence packages
LiteLLM provides a unified Python interface to call 100+ LLM providers (OpenAI, Anthropic, Gemini, Bedrock, Azure, and others) using OpenAI-compatible API format, available as both a Python SDK and a self-hosted AI Gateway proxy server.
Install it if you need to work with multiple LLM providers or want to centralize LLM routing in your organization.
Client library and CLI tool for downloading, uploading, and managing models, datasets, and repositories on the Hugging Face Hub platform.
Install it if you work with Hugging Face Hub models or datasets.
LangChain provides a framework for building agents and LLM-powered applications by composing language models, tools, and memory through a unified API that abstracts over multiple model providers.
hf-xet provides chunk-based deduplication and efficient file transfer for the Hugging Face Hub, enabling faster uploads and downloads of large files with local disk caching.
Tokenizers converts raw text into token sequences for NLP models, with support for training custom vocabularies and using pre-built tokenizers (BPE, WordPiece) optimized for speed via Rust.
Transformers provides a unified framework for loading, fine-tuning, and running state-of-the-art pretrained models across text, vision, audio, video, and multimodal tasks using PyTorch, JAX, or TensorFlow.
Install it if you need to run or train any transformer-based model for NLP, vision, audio, or multimodal tasks.
See also ipywidgets · asciitree · ipytree · johnnydep · prettyprinter · dtreeviz · yellowbrick · gdbmongo · wadler-lindig · pprintpp