Skip to main content

WireLog analytics client — zero dependencies

Project description

wirelog

WireLog analytics client for Python. Zero dependencies — stdlib only.

Install

pip install wirelog

Quick Start

from wirelog import WireLog

wl = WireLog(api_key="sk_your_secret_key")

# Track an event
wl.track("signup", user_id="u_123", event_properties={"plan": "free"})

# Query analytics (returns Markdown by default)
result = wl.query("signup | last 7d | count by day")
print(result)

# Identify a user (bind device → user, set profile)
wl.identify("alice@acme.org", device_id="dev_abc", user_properties={"plan": "pro"})

Configuration

wl = WireLog(
    api_key="sk_...",         # or set WIRELOG_API_KEY env var
    host="https://api.wirelog.ai", # or set WIRELOG_HOST env var
    timeout=30,                # HTTP timeout in seconds
)

API

wl.track(event_type, *, user_id, device_id, session_id, event_properties, user_properties, insert_id)

Track a single event. Auto-generates insert_id and time if not provided.

wl.track_batch(events)

Track multiple events in one request (up to 2000).

wl.query(q, *, format="llm", limit=100, offset=0)

Run a pipe DSL query. Format: "llm" (Markdown), "json", or "csv".

wl.identify(user_id, *, device_id, user_properties, user_property_ops)

Bind a device to a user and/or update profile properties.

Zero Dependencies

This library uses only the Python standard library (urllib.request, json, time, uuid, os). No requests, no httpx, no urllib3. It works out of the box on any Python 3.9+ installation.

Learn More

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

wirelog-0.1.0.tar.gz (5.5 kB view details)

Uploaded Source

Built Distribution

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

wirelog-0.1.0-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

File details

Details for the file wirelog-0.1.0.tar.gz.

File metadata

  • Download URL: wirelog-0.1.0.tar.gz
  • Upload date:
  • Size: 5.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.9

File hashes

Hashes for wirelog-0.1.0.tar.gz
Algorithm Hash digest
SHA256 bbb15cd0fdc26948701275ed9b03480d9157145871c00f8bb439261ee75a11ad
MD5 bce13290fdd4a9ba3a478580aa71ea70
BLAKE2b-256 92a569344f92187935937ce4bc8504b1acb268a1eb5380d37500532afc3edc9c

See more details on using hashes here.

File details

Details for the file wirelog-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: wirelog-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.9

File hashes

Hashes for wirelog-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1a04c94bbff0e37ff3587952218be55c069a84812c4b1d3dd9020db661dcefb4
MD5 ac17435d15ad2d5465a4b216c13406bf
BLAKE2b-256 6086b8c3280de1bb7194eb39073006d6e60779a93ca6db6734aaf3732195dc13

See more details on using hashes here.

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