1
Install Slomo
Install Slomo from PyPI into your active environment:Slomo requires Python 3.12 or later. If you’re on an older version, see the Installation page for guidance.
2
Add two lines to your app
Import That’s the entire integration. From this point on, Slomo automatically records:
slomo and call enable() at the very top of your application’s entry point — before any other application code runs:- Every function call in your project code
- Unhandled exceptions, including local variables from the crashing frame
- SQL queries (sqlite3, SQLAlchemy, and compatible ORMs)
- HTTP requests made with
requestsorhttpx - Log records at
WARNINGlevel and above - Session metadata: argv, cwd, Python version, hostname, PID, and exit status
3
Run your app and trigger a crash
To see Slomo in action, save the following as When the script exits (even after a crash), Slomo writes the full session recording to
app.py in an empty directory and run it. The script has a deliberate bug — checkout() crashes when the requested SKU is missing from the database.app.py
.slomo/ in the current directory. The directory is created automatically on the first run.4
Explore the recording with the CLI
With the recording on disk, use the Slomo CLI to understand what went wrong.List all recorded crashes:Slomo groups crashes by fingerprint so you can see at a glance which issues are recurring and how often.Get a root-cause diagnosis:The
slomo doctor pinpoints the first function and variable that went wrong, explains why the crash happened, and suggests a fix — all from the local recording, with no network call.Step through the crash interactively:replay command opens an interactive terminal UI that lets you step forward and backward through every function call, inspect arguments and return values, and see exactly how the program reached the crash.Next steps
Run
slomo init in your project directory to scaffold a .slomo/config.toml file with all available options and inline comments. This is optional — Slomo works without any configuration — but useful when you want to tune what gets recorded or where sessions are stored.- Installation — pip/uv/pipx setup, Python version requirements, and optional integrations
- Core Concepts — understand how
sys.monitoringand PEP 669 power zero-config instrumentation - CLI Reference — full documentation for every Slomo command