Skip to main content

English | 简体中文

⏪ RewindPy

Your Python program crashed. Rewind it.

A local, post-crash time-travel debugger for Python.

CI PyPI Python 3.10+ License: MIT Live Demo

RewindPy demo

Open the live interactive report

RewindPy records a bounded history of project-local Python execution. After an uncaught exception, it writes one self-contained HTML debugging workspace for source code, local values, changes, call stacks, exception causes, and the execution timeline.

Try it in one minute

python -m pip install --upgrade rewindpy
rewindpy doctor
rewindpy demo multi-file --open

What v0.2.0 adds

  • Navigate every captured source file with a project-style file explorer.
  • Follow timeline events, call-stack frames, value origins, and exception causes across files.
  • Open files with Ctrl+P, search the current file with Ctrl+F, and search the whole report with Ctrl+Shift+F.
  • Inspect explicit raise ... from ... causes, implicit exception contexts, from None, notes, and nested tracebacks.
  • Validate report data through Schema v2 and an embedded SHA-256 integrity digest.
  • Exercise the real report UI in Chromium during CI and track report-generation performance.

Debug your own script

rewindpy run --open app.py
rewindpy --lang zh run --open app.py
rewindpy run --output crash.html app.py -- --port 8080

A crashing target keeps its original non-zero exit code. Reports are local HTML files and do not require a server.

Report workspace

The report combines:

  • a bounded execution timeline with play, pause, step, and speed controls;
  • complete captured source files with current, crash, origin, and search highlights;
  • local variables and per-step changes;
  • a clickable call stack and exception chain;
  • Crash Slice, missing-key origin, likely key rename, and None-origin analysis;
  • English and Simplified Chinese UI, dark/light themes, copy diagnostics, and VS Code source links.

Built-in demos

rewindpy demo none-origin --open
rewindpy demo key-error --open
rewindpy demo crash-slice --open
rewindpy demo exception-chain --open
rewindpy demo multi-file --open

pytest integration

pytest --rewind
pytest --rewind --rewind-dir reports --rewind-lang zh

Passing tests do not create reports. Failed-test reports are written to .rewindpy/ by default, while pytest keeps its normal output and exit code.

Safe tracing

rewindpy run --max-events 5000 --include src --exclude tests app.py
rewindpy run --max-events 5000 --max-report-mb 10 app.py

RewindPy uses a bounded ring buffer, skips common environment and build directories, compresses repeated loops, preserves crash-critical events, and records retained/discarded statistics.

Command reference

rewindpy --version
rewindpy --lang auto|en|zh --help
rewindpy doctor [--json]
rewindpy [--lang auto|en|zh] demo [none-origin|key-error|crash-slice|exception-chain|multi-file] [--output FILE] [--open]
rewindpy [--lang auto|en|zh] run SCRIPT [--output FILE] [--max-events N] [--include PATH] [--exclude PATH] [--max-report-mb MB] [--open] [-- ARGS...]

Development and quality gates

python -m pip install -e ".[dev,e2e]"
python -m ruff check .
python -m pytest -q
python -m playwright install chromium
REWINDPY_REQUIRE_BROWSER_E2E=1 python -m pytest -q tests/e2e
python benchmarks/report_benchmark.py --events 5000 --iterations 3
python scripts/build_live_demo.py --check
rewindpy doctor

See browser testing, performance, report schema, exception chains, and multi-file navigation.

Current scope

RewindPy v0.2.0 targets Python 3.10+, single-threaded local scripts, uncaught exceptions, pytest failures, and Python files under the traced project root.

It is not deterministic replay. It does not yet model async task causality, multiprocessing, native extensions, live breakpoints, or arbitrary mutation inside opaque objects.

Safety

Crash reports can contain runtime data. RewindPy writes them locally and redacts variable or dictionary keys containing names such as password, token, secret, and api_key. Always review a report before sharing it.

See CONTRIBUTING.md, SECURITY.md, RELEASING.md, and CHANGELOG.md.

License

RewindPy is licensed under the MIT License.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rewindpy-0.2.0.tar.gz (58.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

rewindpy-0.2.0-py3-none-any.whl (49.8 kB view details)

Uploaded Python 3

File details

Details for the file rewindpy-0.2.0.tar.gz.

File metadata

  • Download URL: rewindpy-0.2.0.tar.gz
  • Upload date:
  • Size: 58.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for rewindpy-0.2.0.tar.gz
Algorithm Hash digest
SHA256 a828529d7fa47ec476b445290419f1aeae6742fc4dbe708706999c8d39b13286
MD5 40c10efcbd2d4ea04075670a2de1dc7b
BLAKE2b-256 c7110d9823267f4a5ac6855b4da50ae2e08f0818fea093371a3e444468c32649

See more details on using hashes here.

Provenance

The following attestation bundles were made for rewindpy-0.2.0.tar.gz:

Publisher: release.yml on LIRuixuan0407/rewindpy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file rewindpy-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: rewindpy-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 49.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for rewindpy-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a6ecaf5bd01d42c43f17956a00c8dd05be19ef16a28e5faba2819fa7bbfdafe7
MD5 d9bbb46a056284aac8bcc6c6f5cee40f
BLAKE2b-256 bf82437040e08263ada472136b1f6e02df87e81475843a6a8e590f49984c12e9

See more details on using hashes here.

Provenance

The following attestation bundles were made for rewindpy-0.2.0-py3-none-any.whl:

Publisher: release.yml on LIRuixuan0407/rewindpy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 files

0.1.1

2 files

0.1.0

2 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