Skip to main content

logiq

Official Python SDK for the LogIQ AI observability platform. Batches structured log/error events on a background thread and ships them to your LogIQ project over HTTP.

Install

pip install logiq-sdk

Quick start

from logiq import Monitor

monitor = Monitor(
    api_key="<YOUR_API_KEY>",
    base_url="https://your-logiq-backend.example.com",
    service_name="checkout-service",
)

monitor.info("Order placed", operation="create_order", metadata={"order_id": 123})

try:
    ...
except Exception as exc:
    monitor.capture_exception(exc, operation="create_order")

Only WARN and above are sent by default — pass min_level="INFO" (or "DEBUG") to Monitor(...) to lower the threshold.

ASGI / Flask middleware

from logiq import MonitorASGIMiddleware, attach_flask_middleware

# FastAPI / Starlette
app.add_middleware(MonitorASGIMiddleware, monitor=monitor)

# Flask
attach_flask_middleware(app, monitor)

Correlation IDs

from logiq import set_correlation_id, reset_correlation_id, get_correlation_id

token = set_correlation_id("req-123")
try:
    ...
finally:
    reset_correlation_id(token)

Heartbeats

monitor.heartbeat()               # one-off
monitor.start_heartbeat_loop(30)  # periodic, every 30s, stops on monitor.close()

License

MIT

Download files

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

Source Distribution

logiq_sdk-1.0.0.tar.gz (6.7 kB view details)

Uploaded Source

Built Distribution

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

logiq_sdk-1.0.0-py3-none-any.whl (6.7 kB view details)

Uploaded Python 3

File details

Details for the file logiq_sdk-1.0.0.tar.gz.

File metadata

  • Download URL: logiq_sdk-1.0.0.tar.gz
  • Upload date:
  • Size: 6.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for logiq_sdk-1.0.0.tar.gz
Algorithm Hash digest
SHA256 269715db3e155cf012529a48b9ceeed548f8cdef32f94f1fc74c4dd772f7a660
MD5 dfd7a11c4584104ffc7c0548bebc2c91
BLAKE2b-256 c172a301b2163d961e191a6b87f23102a257aebb9825e4a7856cc9fcdde985b1

See more details on using hashes here.

File details

Details for the file logiq_sdk-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: logiq_sdk-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 6.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for logiq_sdk-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 94df79ddfb41cec9925ba22aeb5a58091c4360197269ea8dbbe34a5a855a7def
MD5 6650c084d4f10561ef23b207a9c24374
BLAKE2b-256 d13b34a8ec4d7d5a8388088433427c5a2d4ea04a81d90cf9cb9a4467e43df72e

See more details on using hashes here.

Release history Release notifications | RSS feed

1.0.1

2 files

This release

1.0.0 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page