Skip to main content

Python SDK for Lunary, the open-source platform where GenAI teams manage and improve LLM chatbots.

Project description

Lunary Python SDK

📈 Python monitoring for AI apps and agent

website - docs - PyPI - Version


Use it with any LLM model and custom agents (not limited to OpenAI).

To get started, get a project ID by registering here.

🛠️ Installation

pip install lunary

🤖 Anthropic Integration

from anthropic import Anthropic
import lunary

client = Anthropic()
lunary.monitor(client)

parsed = client.messages.parse(
    model="claude-sonnet-4-5-20250929",
    max_tokens=256,
    messages=[{"role": "user", "content": "Return JSON with an answer field for 2 + 2."}],
    output_format=dict,
)

with client.messages.stream(
    model="claude-sonnet-4-5-20250929",
    max_tokens=256,
    messages=[{"role": "user", "content": "Stream one sentence about Lunary."}],
) as stream:
    for event in stream:
        pass

📖 Documentation

Full docs are available here.

Project details


Release history Release notifications | RSS feed

Download files

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

Source Distribution

lunary-1.4.41.tar.gz (27.1 kB view details)

Uploaded Source

Built Distribution

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

lunary-1.4.41-py3-none-any.whl (32.2 kB view details)

Uploaded Python 3

File details

Details for the file lunary-1.4.41.tar.gz.

File metadata

  • Download URL: lunary-1.4.41.tar.gz
  • Upload date:
  • Size: 27.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.3.3 CPython/3.14.3 Darwin/25.4.0

File hashes

Hashes for lunary-1.4.41.tar.gz
Algorithm Hash digest
SHA256 7b5b101beada6a87743a546e58ddb3aad70b5e13300129e4fb951490e867663e
MD5 d7c89064d736cf5778e9460ce6e173ba
BLAKE2b-256 158d5929f9993fd5ec2c8185629740360f99e05f58d925713d8ff2c94fd045f5

See more details on using hashes here.

File details

Details for the file lunary-1.4.41-py3-none-any.whl.

File metadata

  • Download URL: lunary-1.4.41-py3-none-any.whl
  • Upload date:
  • Size: 32.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.3.3 CPython/3.14.3 Darwin/25.4.0

File hashes

Hashes for lunary-1.4.41-py3-none-any.whl
Algorithm Hash digest
SHA256 25b51a7a56db2063788f911251ef3297c30f867b47a02a34ffc7548e18f2dec6
MD5 0995c269393efdc1c9e54bba3efda05b
BLAKE2b-256 6fa2d4bd511d639bdb742cfad84d2061787540969de56012f4d8aa2d9c9bc4d1

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