Skip to main content

anytimeline

Interactive timeline and event charts for Jupyter and marimo notebooks, drawn on the GPU (WebGPU, WebGL2, or Canvas 2D on machines without a usable GPU).

pip install anytimeline

Documentation: https://mluttikh.github.io/anytimeline/ · Changelog: CHANGELOG.md · Licence: MIT.

Status: version 0.1. It draws event charts: one mark per event at the moment it happened, on lanes, so the order of what happened is easy to see. Time can be datetimes (any time zone, any century), durations from nanoseconds up, or plain numbers; a Time | Order switch spaces events by rank instead of time. Up to about a million events. It also draws Gantt charts and schedules: bars from a start to an end, with dependencies, progress and milestones, and overlapping bars stacked per lane; and traces: spans under spans.

from anytimeline import Timeline
from anytimeline.synthetic import service_log

log = service_log()  # a dict of columns; any Polars, pandas or PyArrow table works too
tl = Timeline()
tl.events(
    log,
    time="time",
    lane="service",
    color="level",
    symbol="event",
    route="request",
    order="seq",
    tooltip=["request", "user", "bytes"],
)
tl  # click it, then scroll to zoom time; drag to pan; the toolbar has Zoom and Select

A Gantt chart from a table with a row per task:

from anytimeline import gantt

gantt(plan, task="task", start="start", end="end", depends="after", progress="done",
      color="phase", today="2026-10-12")

Bars on other lanes (machines, people, services) come from Timeline.intervals(...), and mix with events on the same lanes.

Traces (OpenTelemetry, or any table of spans with a parent) plot as a waterfall that folds, with each span's duration and the critical path:

from anytimeline import Timeline
from anytimeline.otel import read_otlp

tr = read_otlp("traces.jsonl")  # or anytimeline.synthetic.traces()
Timeline().spans(tr.spans, color="service").events(tr.events, time="time", lane="span_id")

The toolbar has three tools: Pan (drag moves through time and lanes), Zoom (drag a time range to show it) and Select (drag a box, or click an event; the selection is rows of your table in tl.selection). Time and Order switch the scale; the Display panel sets the text size, the mark size and whether overlapping events spread (also Timeline(font_size=14, mark_scale=0.75)). Press ? in the plot for every mouse gesture and key; f or the button shows it full screen, where lanes fill the screen and overlapping events spread out.

States (Timeline.states: up, degraded, down per lane) and values (Timeline.values: a number over time, as a line, area or steps) go on the same lanes, behind the events.

group="host" on a layer puts each host's lanes under a header of their own, in one plot (Timeline(align="start") compares groups from their start); separate plots link with a.link(b) and zoom and pan together.

plot.save_html("plot.html") writes the plot to one file that opens in any browser, still interactive; the toolbar saves it as a PNG, and so does plot.save_png("plot.png").

Documentation online: https://mluttikh.github.io/anytimeline/; or build it with uv run python scripts/build_docs.py and open site/index.html. Example notebooks in examples/: event charts, Gantt charts, traces, states and values, groups and linked plots and sharing. How the plot is drawn: the explanation in the docs.

Development

Needs Python (via uv) and Node.js 20+ for the JavaScript bundle.

(cd js && npm ci && npm run build)    # build src/anytimeline/static/widget.js
uv sync                               # create .venv with dev tools
uv run pytest                         # Python tests
(cd js && npm run typecheck && npm test)
uv run ruff check . && uv run ruff format --check . && uv run ty check
uv run python scripts/make_scenes.py  # scenes for the visual tests
(cd js && npx playwright install chromium && npm run test:visual)  # every scene × backend, marimo
uv run nbstripout --install           # once per clone: commit notebooks without outputs
uv run python scripts/build_docs.py   # user documentation into site/ (examples run; warnings fail)
uv run python scripts/build_docs.py serve   # preview it at http://localhost:8000

The user documentation is in docs/user/, built with Zensical and organised as tutorials, how-to guides, reference and explanation. Its examples are ```python exec="on" blocks that run while building, and its plots are live: each example prints plot._embed_html(), which standalone.js draws in the page. The API reference comes from the docstrings (Google style). The browser tests check the built site too (docs.spec.ts, skipped until it is built).

Visual tests draw the scenes in js/test/visual/scenes/ with each backend and compare them with stored screenshots (macOS); npm run test:visual:update stores new ones after an intended change. PERF=1 npx playwright test perf measures a million events (after uv run python scripts/make_scenes.py --million).

Metadata

Release files for anytimeline 0.2.0

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

Source distribution (sdist)

Source distribution for anytimeline 0.2.0
File Size Uploaded Provenance
anytimeline-0.2.0.tar.gz 243.1 kB With provenance Details

Built distribution (wheel)

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

Total release size: 390.6 kB

Release files / anytimeline-0.2.0.tar.gz

Download URL anytimeline-0.2.0.tar.gz
Size 243.1 kB
Tags Source
SHA-256 checksum
How to use checksums
c5c7483547a43b580e78d5e8bd000d8018e69c200937fb8df4cb477c4af73c90
BLAKE2b-256 checksum
How to use checksums
5bf063e197720a111c55db0e29c344780cef020769d77412ea031cd273e7d520
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 11, 2026.

Transparency log

Release files / anytimeline-0.2.0-py3-none-any.whl

Download URL anytimeline-0.2.0-py3-none-any.whl
Size 147.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
340cce3c80b6de2afb956639be1b9ce104355aed64165bf8fba23b9657c402a4
BLAKE2b-256 checksum
How to use checksums
34a5ce52b7c35ae6550c1bf0a97447cec3360763d224aed440b216e4e3e8702b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 11, 2026.

Transparency log

Security for anytimeline 0.2.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.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for anytimeline-0.2.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 11, 2026.

Transparency log

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.

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