Crash capture and replay for async Python functions and background tasks
Project description
VivreCard 🏴☠️
Every crash leaves a card.
Crash capture and replay for async Python functions and background tasks.
When an async function fails silently, VivreCard saves everything — inputs, context, traceback — so you can understand and reproduce the failure instantly.
The Problem
background_tasks.add_task(process_feedback, db, session)
# crashes silently... score is always 5... no idea why
The Solution
from vivrecard import capture, attach
@capture
async def process_feedback(db, session):
attach("session_id", str(session.id))
attach("role", session.role)
...
When it crashes:
🏴☠️ VivreCard | Crash captured: process_feedback
Exception: JSONDecodeError: Expecting value: line 1 column 1
Saved to: .vivrecard/2026-03-29T21-14-03_process_feedback.json
Installation
pip install vivrecard
Usage
Capture crashes
from vivrecard import capture, attach
@capture
async def my_background_task(user_id: int, data: dict):
attach("user_id", user_id) # attach extra context
...
Redact sensitive fields
@capture(redact=["password", "api_key"])
async def my_task(password: str, api_key: str):
...
List captured crashes
vivrecard list
Replay a crash
vivrecard replay .vivrecard/2026-03-29T21-14-03_process_feedback.json
Crash Artifact
Every crash is saved as a JSON file in .vivrecard/:
{
"function": "process_feedback",
"module": "app.services.interview",
"is_async": true,
"timestamp": "2026-03-29T21:14:03Z",
"args": [],
"kwargs": {"session_id": 42},
"context": [{"key": "role", "value": "Software Engineer"}],
"exception": {
"type": "JSONDecodeError",
"message": "Expecting value: line 1 column 1"
},
"traceback": "..."
}
Why VivreCard?
In One Piece, a Vivre Card tracks someone's condition and location. VivreCard tracks your async task's state at the moment it starts falling apart.
License
MIT
Project details
Release history Release notifications | RSS feed
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 vivrecard-0.1.0.tar.gz.
File metadata
- Download URL: vivrecard-0.1.0.tar.gz
- Upload date:
- Size: 4.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0bc674ac3e21ebcf11c2eb3e519453524015c0fdec0f58b155fe5a2d13fcfa33
|
|
| MD5 |
b1c3483cb4f297fad336dd118d8c81b8
|
|
| BLAKE2b-256 |
b81cb50ad26dc1577a7c0f075a2bba920f91d033dac50629f1e1a6b6802e33d9
|
File details
Details for the file vivrecard-0.1.0-py3-none-any.whl.
File metadata
- Download URL: vivrecard-0.1.0-py3-none-any.whl
- Upload date:
- Size: 7.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2a8af123028ba70723c7a45f63e599e67c0b632d5cdbe12410b07deb42a2c0b0
|
|
| MD5 |
af0bd12ef4aacfb25a398cd2f0871f12
|
|
| BLAKE2b-256 |
66b4de9971edc033b1d04b400c9cc9caa844aee454568fd8b51a136af0e543b2
|