⏪ RewindPy
Your Python program crashed. Rewind it.
A local, post-crash time-travel debugger for Python.
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 withCtrl+F, and search the whole report withCtrl+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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a828529d7fa47ec476b445290419f1aeae6742fc4dbe708706999c8d39b13286
|
|
| MD5 |
40c10efcbd2d4ea04075670a2de1dc7b
|
|
| BLAKE2b-256 |
c7110d9823267f4a5ac6855b4da50ae2e08f0818fea093371a3e444468c32649
|
Provenance
The following attestation bundles were made for rewindpy-0.2.0.tar.gz:
Publisher:
release.yml on LIRuixuan0407/rewindpy
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
rewindpy-0.2.0.tar.gz -
Subject digest:
a828529d7fa47ec476b445290419f1aeae6742fc4dbe708706999c8d39b13286 - Sigstore transparency entry: 2364551055
- Sigstore integration time:
-
Permalink:
LIRuixuan0407/rewindpy@cbc754608c33d674d5faa6fb5d4c94063e96045a -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/LIRuixuan0407
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@cbc754608c33d674d5faa6fb5d4c94063e96045a -
Trigger Event:
push
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a6ecaf5bd01d42c43f17956a00c8dd05be19ef16a28e5faba2819fa7bbfdafe7
|
|
| MD5 |
d9bbb46a056284aac8bcc6c6f5cee40f
|
|
| BLAKE2b-256 |
bf82437040e08263ada472136b1f6e02df87e81475843a6a8e590f49984c12e9
|
Provenance
The following attestation bundles were made for rewindpy-0.2.0-py3-none-any.whl:
Publisher:
release.yml on LIRuixuan0407/rewindpy
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
rewindpy-0.2.0-py3-none-any.whl -
Subject digest:
a6ecaf5bd01d42c43f17956a00c8dd05be19ef16a28e5faba2819fa7bbfdafe7 - Sigstore transparency entry: 2364551122
- Sigstore integration time:
-
Permalink:
LIRuixuan0407/rewindpy@cbc754608c33d674d5faa6fb5d4c94063e96045a -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/LIRuixuan0407
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@cbc754608c33d674d5faa6fb5d4c94063e96045a -
Trigger Event:
push
-
Statement type: