Arguslog Python SDK — error tracking for server-side Python apps
Project description
arguslog (Python SDK)
Arguslog SDK for Python 3.9+. Zero runtime dependencies — uses stdlib
urllib for transport and threading.Thread for the background sender.
Install
pip install arguslog
Quick start
import arguslog
arguslog.init(
"arguslog://<key>@<host>/api/<projectId>",
environment="production",
release="1.2.3",
)
try:
do_something_risky()
except Exception as exc:
arguslog.capture_exception(exc)
# Always flush before the process exits — short-lived scripts and CLIs
# will exit before the background sender drains otherwise.
arguslog.flush()
Manual capture
arguslog.capture_message("user signup completed", level="info")
arguslog.set_user({"id": "u-1234", "email": "alice@example.com"}) # email auto-scrubbed
arguslog.set_tag("region", "eu-west")
arguslog.set_context("order", {"id": 42, "total_cents": 9900})
arguslog.add_breadcrumb({"category": "nav", "message": "/cart"})
Integrations
Uncaught exceptions
from arguslog.integrations.excepthook import install_excepthook
install_excepthook(arguslog.get_client())
The wrapper preserves the previous sys.excepthook (so debuggers,
IPython, etc. still work) and skips KeyboardInterrupt.
Standard logging module
import logging
from arguslog.integrations.logging import install_logging_handler
install_logging_handler(arguslog.get_client(), level=logging.ERROR)
logging.getLogger(__name__).error("payment failed", exc_info=True)
ERROR-or-higher records with exc_info become capture_exception;
everything else at or above the handler's level becomes
capture_message.
CLI / script lifecycle
try:
main()
finally:
arguslog.flush() # or arguslog.close() if you want to tear down
Without a flush, a CLI that exits in <1s will likely terminate before the background sender's first request leaves the socket.
Wire format
The on-the-wire JSON shape is identical to @arguslog/sdk-node and
org.arguslog:arguslog-java-sdk so all events from a polyglot stack
land in the same Arguslog issue groups.
Project details
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 arguslog-1.0.0.tar.gz.
File metadata
- Download URL: arguslog-1.0.0.tar.gz
- Upload date:
- Size: 42.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
731edeae26cd5baf9fdadb1cdd899b694af5625852be308cfc7aa8c53beefafb
|
|
| MD5 |
747fcf70bc74eed7c779841f0e5fd222
|
|
| BLAKE2b-256 |
a752072975c404cd3868645ac3a568aea009cb0ab7873b3b29d666fdd8f22183
|
Provenance
The following attestation bundles were made for arguslog-1.0.0.tar.gz:
Publisher:
release-sdk-python.yml on petarnenov/arguslog
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
arguslog-1.0.0.tar.gz -
Subject digest:
731edeae26cd5baf9fdadb1cdd899b694af5625852be308cfc7aa8c53beefafb - Sigstore transparency entry: 1475024738
- Sigstore integration time:
-
Permalink:
petarnenov/arguslog@1639fd278f02c994f02b3e19912630a8f3ab98c2 -
Branch / Tag:
refs/tags/python-sdk-v1.0.0 - Owner: https://github.com/petarnenov
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-sdk-python.yml@1639fd278f02c994f02b3e19912630a8f3ab98c2 -
Trigger Event:
push
-
Statement type:
File details
Details for the file arguslog-1.0.0-py3-none-any.whl.
File metadata
- Download URL: arguslog-1.0.0-py3-none-any.whl
- Upload date:
- Size: 10.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d7d63864bc68d92aa163df3ee667342a7cb0998cf33780a621a40990897cf1cf
|
|
| MD5 |
f9086b4cf2d4086f471eb45420f65588
|
|
| BLAKE2b-256 |
7cd7b939f0a69c05579fb12582703fafaaa90dd20b5efe339e06d07d654733fe
|
Provenance
The following attestation bundles were made for arguslog-1.0.0-py3-none-any.whl:
Publisher:
release-sdk-python.yml on petarnenov/arguslog
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
arguslog-1.0.0-py3-none-any.whl -
Subject digest:
d7d63864bc68d92aa163df3ee667342a7cb0998cf33780a621a40990897cf1cf - Sigstore transparency entry: 1475024848
- Sigstore integration time:
-
Permalink:
petarnenov/arguslog@1639fd278f02c994f02b3e19912630a8f3ab98c2 -
Branch / Tag:
refs/tags/python-sdk-v1.0.0 - Owner: https://github.com/petarnenov
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-sdk-python.yml@1639fd278f02c994f02b3e19912630a8f3ab98c2 -
Trigger Event:
push
-
Statement type: