Skip to main content

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.

PyPI version provenance verified Python versions license

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.Lock around the in-memory batch. Safe for multi-threaded apps (Django under Gunicorn, FastAPI workers, Celery).
  • Background flushing: A daemon thread flushes every flush_interval seconds; errors send immediately on a separate endpoint.
  • Asyncio: Error capture installs a handler on the active event loop when init() runs inside one. Call init() 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

auralog-0.1.0.tar.gz (14.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

auralog-0.1.0-py3-none-any.whl (11.3 kB view details)

Uploaded Python 3

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

Hashes for auralog-0.1.0.tar.gz
Algorithm Hash digest
SHA256 29a6a41f2d3c81bf55159cf62e38f4a40ec8a6c7e10b382a258991931c393f0b
MD5 ddd086bde4bfc58619dfbdcc70ffe5ab
BLAKE2b-256 8f43872b36f3b3246258a89adf0e44f0c1a6a35a75fbb2873f564411e2c7991a

See more details on using hashes here.

Provenance

The following attestation bundles were made for auralog-0.1.0.tar.gz:

Publisher: release.yml on auralog-ai/auralog-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for auralog-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 84d2059e8d20b7fe096f8308e41fab234e6a6af1932d2529fa884f2c95eaf488
MD5 3c7b1b5929748336bdf562e936512c7d
BLAKE2b-256 d8eff64323db638279d89ac983be9c9443de9bb19cf466bd2612d768320706a3

See more details on using hashes here.

Provenance

The following attestation bundles were made for auralog-0.1.0-py3-none-any.whl:

Publisher: release.yml on auralog-ai/auralog-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page