Install & Compatibility
Where this runs
tested against v1.4.41 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 207.7MB
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 13.8s · import 0.000s · 211MB
184MB installed
● package 184MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
AgentFinish
✓ from lunary import AgentFinish
✗ from lunary import LunaryHandler
Initialize LunaryHandler with your API key and track an event.
import os
from lunary import LunaryHandler
# Set your Lunary API key
os.environ['LUNARY_PUBLIC_KEY'] = 'your-public-key'
handler = LunaryHandler(
public_key=os.environ.get('LUNARY_PUBLIC_KEY', ''),
# Optional: specify a different endpoint
# endpoint="https://api.lunary.ai"
)
# Usage example: track a chat completion
handler.track_event("chat", {
"model": "gpt-3.5-turbo",
"messages": [{"role": "user", "content": "Hello"}],
"output": "Hi there!"
})
Upgrade
Version history
1.4.41latest on PyPI · released Apr 8, 2026
Audit
Dependencies
openaioptionalOptional integration for OpenAI. If you want to use Lunary's OpenAI monitoring, install with lunary[openai].