ChartBook
Data pipelines with provenance. Know exactly where every number came from.
ChartBook connects your team's data pipelines, in any language, so each one builds on another's exact, versioned output. Every chart traces back to its sources, every input is verified by hash, and everything lands in one catalog your team browses and your agents build on.
pip install chartbook
One install has everything: the command line, data loading, plotting and the site builder.
What it does
- Depend. Build on another pipeline's exact output, the way you depend on a package.
chartbook add acme/ratespins its newest snapshot inchartbook.lock, and what you read changes only when you runchartbook update. - Trace. Every dataframe, chart and model records what it was made from, by content hash.
chartbook lineagewalks the chain back to the first source and checks every hash on the way. - Rebuild. A snapshot keeps the exact bytes a pipeline made, labelled with its commit.
chartbook restoreputs back an output that took a day to compute. - Discover. Many pipelines become one catalog: a searchable website for your team, and an
index, an
llms.txtand a command line your agents work from.
A pipeline, in three files
A pipeline is a folder in git: a manifest that says what it makes, the code that makes it, and a README. The Quickstart builds this one in five minutes.
chartbook.toml:
[project]
name = "My Pipeline"
description = "A demo pipeline: two random walks and a chart of them"
[dataframes.walks]
name = "Random Walks"
description = "Two simulated random walk series"
sources = ["Simulated"]
path = "./_data/walks.parquet"
date_col = "date"
docs = "365 daily observations of two cumulative-sum series."
[charts.random_walks]
name = "Two Random Walks"
description = "Cumulative sums of daily standard-normal draws"
dataframe = "walks"
path = "./_output/random_walks.html"
docs = "Both series are pure noise. Any pattern you see is your brain's doing."
src/build_chart.py asks the manifest where walks goes instead of repeating the path:
import numpy as np
import pandas as pd
import chartbook
from chartbook import data
rng = np.random.default_rng(seed=42)
df = pd.DataFrame({
"date": pd.date_range("2024-01-01", periods=365, freq="D"),
"walk_a": rng.standard_normal(365).cumsum() + 100,
"walk_b": rng.standard_normal(365).cumsum() + 100,
})
df.to_parquet(data.path("walks")) # chartbook.toml says where "walks" goes
chartbook.plotting.line(
df, x="date", y=["walk_a", "walk_b"], title="Two Random Walks",
).save(chart_id="random_walks", output_dir="_output")
Then, in the folder:
python src/build_chart.py # writes _data/walks.parquet and the chart
chartbook docs build # writes the site, and index.json beside it (the first time it asks whether the folder is yours: y)
chartbook docs open
git add -A && git commit -m "First pipeline"
chartbook snapshot # the build, by hash, into your store, labelled with the commit
Once it has a snapshot, any other pipeline can read that dataset by name, pinned to the exact bytes this one made:
from chartbook import data
walks = data.load("my_pipeline:walks") # the pinned copy, never the other folder
For your team and for your agents
A catalog is one site over every snapshot in your stores. A person browses it; an agent asks the command line the same questions and gets the same answers.
| Your team, in the browser | Your agents, from the command line | |
|---|---|---|
| What is there? | The catalog's home page and search | chartbook ls --json, or the site's llms.txt |
| What is it? | The dataset's or chart's page | chartbook get-docs yield_curve:repo_public |
| Use it | Copy the snippet on the page | data.load("yield_curve:repo_public"), chartbook path, chartbook add yield_curve |
| Can I trust it? | The Provenance table and the Versions page | chartbook lineage --json, and chartbook.lock in git |
chartbook install claude-skill teaches Claude Code all of this.
Documentation
Full documentation is at backofficedev.github.io/chartbook.
- Quickstart: a pipeline, its site and its first snapshot in five minutes
- Explore a Catalog: build three public-data pipelines that build on one another, browse them, and depend on one
- Depending on Another Pipeline: snapshots, pins and the lockfile
- Vocabulary: a manifest asks, a lockfile records what was got, a snapshot records what was made, and an index records what a site shows
- CLI Reference and Configuration Reference
Contributing
Contributions are welcome. See CONTRIBUTING for guidelines.
To work on ChartBook itself you need uv and nothing else. From a clone:
uv sync # the project, editable, and its dev toolchain, from uv.lock
uv run doit # notebooks, docs, examples, the package, then the test matrix
uv run doit build_package is the same without the tests, and uv run doit test is the suite on one Python.
License
Modified BSD License
Metadata
Release files for chartbook 0.5.2
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 |
|---|---|---|---|---|
| chartbook-0.5.2.tar.gz | 12.0 MB | Without provenance | Details for chartbook-0.5.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| chartbook-0.5.2-py3-none-any.whl | Python 3 | none | any | Details for chartbook-0.5.2-py3-none-any.whl |
Total release size: 24.2 MB
Release files / chartbook-0.5.2.tar.gz
| Download URL | chartbook-0.5.2.tar.gz |
|---|---|
| Size | 12.0 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
88ff69bb06748e70e88b393fc8337f609222a88a289b7ad53ca1eb9bfd3cd663
|
|
BLAKE2b-256 checksum How to use checksums |
df2b399c1ab42e09b9c60b0450575085f6ee8f5271bd939baff3137848d58308
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-httpx/0.28.1
|
Release files / chartbook-0.5.2-py3-none-any.whl
| Download URL | chartbook-0.5.2-py3-none-any.whl |
|---|---|
| Size | 12.1 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
96809071127096b167d0309825ce56da170ae3ebcf169ef82cd55d94a2c14e81
|
|
BLAKE2b-256 checksum How to use checksums |
95a4ae290e2a013bf685c45e43e8c67ba1016180c29df6cde8cec0f48798ae08
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-httpx/0.28.1
|
Security for chartbook 0.5.2
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.