ez-pixel
Universal error tracking SDK for Python. Part of the ezcoder ecosystem.
Install
pip install ez-pixel
Quick Start
Automatic setup (recommended)
ezcoder pixel install
This detects your Python project, installs ez-pixel, wires the init file into your entry point, and generates a project key.
Manual setup
import ez_pixel
ez_pixel.init_pixel(
project_key="pk_live_abc123",
ingest_url="https://your-pixel-server.workers.dev/ingest",
)
That's it — unhandled exceptions are now tracked automatically.
API
init_pixel(project_key, ingest_url, *, runtime=None)
Initialize the SDK. Registers sys.excepthook, threading.excepthook, and atexit handlers.
report_pixel(message, error=None, level="error")
Manually report an error.
try:
risky_operation()
except Exception as e:
ez_pixel.report_pixel("Risky operation failed", error=e, level="warning")
flush_pixel()
Drain the internal event queue (blocking). Call before process exit in short-lived scripts.
close_pixel()
Flush + tear down all hooks and deactivate the SDK.
Features
- Zero dependencies — uses only the Python standard library
- Thread-safe — events are queued and drained in a background thread
- Exponential backoff — retries failed deliveries (0.2s → 0.4s → 0.8s → 1.6s → 3.2s)
- Code context — captures source lines around the error
- Fingerprinting — groups duplicate errors with SHA-256 fingerprints
- Python 3.8+ — works on older Python versions
Wire Format
Events are posted as JSON to the ingest endpoint:
{
"event_id": "uuid4",
"project_key": "pk_live_abc123",
"fingerprint": "sha256(type + top frame)[:16]",
"type": "ValueError",
"message": "something went wrong",
"stack": [{"file": "main.py", "line": 42, "col": 0, "fn": "run", "in_app": true}],
"code_context": {"file": "main.py", "error_line": 42, "lines": ["..."]},
"runtime": "python-3.12.3",
"manual_report": false,
"level": "error",
"occurred_at": "2026-04-29T14:22:01Z"
}
License
MIT
Metadata
Release files for ez-pixel 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ez_pixel-0.1.0.tar.gz | 12.3 kB | Without provenance | Details for ez_pixel-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ez_pixel-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for ez_pixel-0.1.0-py3-none-any.whl |
Total release size: 24.6 kB
Release files / ez_pixel-0.1.0.tar.gz
| Download URL | ez_pixel-0.1.0.tar.gz |
|---|---|
| Size | 12.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9a07baaac4f70233d1ea45774e68130d9f08f8943cfc3f3e1ea0ad6706c620fa
|
|
BLAKE2b-256 checksum How to use checksums |
9a7c8674a7271675adf0eef3dc50d7ae1cfd51b93880e66b686bc7e7db5fda2f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Release files / ez_pixel-0.1.0-py3-none-any.whl
| Download URL | ez_pixel-0.1.0-py3-none-any.whl |
|---|---|
| Size | 12.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
622ee566418426f8336d6078b39167235dd4ab0fb7df8adf91338b46fd352444
|
|
BLAKE2b-256 checksum How to use checksums |
eaea7f1447473af987da5087b30a7922acdc1c655174ceec273ec439e7363569
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Security for ez-pixel 0.1.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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
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.