Skip to content

Python SDK

import { Aside } from ‘@astrojs/starlight/components’;

In the meantime, you can hit the HTTP API directly:

import requests
import json
import time
def send_log(project_id, bucket, level, message, context=None, tags=None):
requests.post("http://localhost:17655/logs", json={
"projectId": project_id,
"logs": [{
"bucket": bucket,
"level": level,
"message": message,
"timestamp": int(time.time() * 1000),
"context": context or {},
"tags": tags or {},
}]
})
# Usage
send_log("my-python-app", "api", "info", "Server started on :8000")

That’s the entire protocol. POST /logs with a JSON body containing projectId and an array of log entries. The desktop app handles the rest.