Auralog Python SDK — agentic logging and application awareness.
Project description
auralog
Python SDK for Auralog — agentic logging and application awareness.
Auralog uses Claude as an on-call engineer: it monitors your logs and errors, alerts you when something's wrong, and opens fix PRs automatically.
Install
pip install auralog
Quick start
from auralog import init, auralog
init(api_key="aura_your_key", environment="production")
auralog.info("user signed in", metadata={"user_id": "123"})
auralog.error("payment failed", metadata={"order_id": "abc"})
Python 3.10+.
Bridge the stdlib logging module (recommended for existing codebases)
Python's logging module is used everywhere — including frameworks (Django, Flask, FastAPI) and libraries (requests, SQLAlchemy, Celery). AuralogHandler captures those logs without requiring code changes:
import logging
from auralog import init, AuralogHandler
init(api_key="aura_your_key", environment="production")
logging.getLogger().addHandler(AuralogHandler())
logging.getLogger().setLevel(logging.INFO)
# Any existing logging.* calls — including from third-party libraries — flow to auralog
logging.info("payment processed", extra={"order_id": "abc"})
Configuration
| Option | Type | Default | Description |
|---|---|---|---|
api_key |
str |
required | Your Auralog project API key |
environment |
str |
"production" |
e.g. "production", "staging", "dev" |
endpoint |
str |
https://ingest.auralog.ai |
Ingest endpoint override |
flush_interval |
float |
5.0 |
Seconds between batched flushes (errors flush immediately) |
capture_errors |
bool |
True |
Capture uncaught exceptions (main thread, threads, asyncio) |
Attaching a traceback
try:
risky()
except Exception as e:
auralog.error("task crashed", metadata={"task": "ingest"}, exc_info=e)
Graceful shutdown
auralog flushes pending logs on interpreter exit automatically via atexit. For deterministic flush (serverless handlers, short-lived scripts):
from auralog import shutdown
shutdown()
Thread and async safety
- Threads: The transport uses a
threading.Lockaround the in-memory batch. Safe for multi-threaded apps (Django under Gunicorn, FastAPI workers, Celery). - Background flushing: A daemon thread flushes every
flush_intervalseconds; errors send immediately on a separate endpoint. - Asyncio: Error capture installs a handler on the active event loop when
init()runs inside one. Callinit()from your framework's startup hook so it installs against your app's loop.
Verify this package
Every release is published with sigstore provenance attestations via GitHub Actions. The attestation proves the distribution was built from a specific commit in this repository — without having to trust PyPI or the maintainer.
Inspect the attestation on pypi.org/project/auralog under "Provenance".
Documentation
Full docs at docs.auralog.ai.
Security
Found a vulnerability? See SECURITY.md for how to report it.
License
MIT © James Thomas
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 auralog-0.1.0.tar.gz.
File metadata
- Download URL: auralog-0.1.0.tar.gz
- Upload date:
- Size: 14.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
29a6a41f2d3c81bf55159cf62e38f4a40ec8a6c7e10b382a258991931c393f0b
|
|
| MD5 |
ddd086bde4bfc58619dfbdcc70ffe5ab
|
|
| BLAKE2b-256 |
8f43872b36f3b3246258a89adf0e44f0c1a6a35a75fbb2873f564411e2c7991a
|
Provenance
The following attestation bundles were made for auralog-0.1.0.tar.gz:
Publisher:
release.yml on auralog-ai/auralog-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
auralog-0.1.0.tar.gz -
Subject digest:
29a6a41f2d3c81bf55159cf62e38f4a40ec8a6c7e10b382a258991931c393f0b - Sigstore transparency entry: 1341820896
- Sigstore integration time:
-
Permalink:
auralog-ai/auralog-python@7e04fe76afc9d5be6a4b394eac8dbad0115e7628 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/auralog-ai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@7e04fe76afc9d5be6a4b394eac8dbad0115e7628 -
Trigger Event:
release
-
Statement type:
File details
Details for the file auralog-0.1.0-py3-none-any.whl.
File metadata
- Download URL: auralog-0.1.0-py3-none-any.whl
- Upload date:
- Size: 11.3 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 |
84d2059e8d20b7fe096f8308e41fab234e6a6af1932d2529fa884f2c95eaf488
|
|
| MD5 |
3c7b1b5929748336bdf562e936512c7d
|
|
| BLAKE2b-256 |
d8eff64323db638279d89ac983be9c9443de9bb19cf466bd2612d768320706a3
|
Provenance
The following attestation bundles were made for auralog-0.1.0-py3-none-any.whl:
Publisher:
release.yml on auralog-ai/auralog-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
auralog-0.1.0-py3-none-any.whl -
Subject digest:
84d2059e8d20b7fe096f8308e41fab234e6a6af1932d2529fa884f2c95eaf488 - Sigstore transparency entry: 1341820899
- Sigstore integration time:
-
Permalink:
auralog-ai/auralog-python@7e04fe76afc9d5be6a4b394eac8dbad0115e7628 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/auralog-ai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@7e04fe76afc9d5be6a4b394eac8dbad0115e7628 -
Trigger Event:
release
-
Statement type: