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.
Metadata
Release files for lunary 1.4.41
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| lunary-1.4.41.tar.gz | 27.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| lunary-1.4.41-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 59.3 kB
Release files / lunary-1.4.41.tar.gz
| Download URL | lunary-1.4.41.tar.gz |
|---|---|
| Size | 27.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7b5b101beada6a87743a546e58ddb3aad70b5e13300129e4fb951490e867663e
|
|
BLAKE2b-256 checksum How to use checksums |
158d5929f9993fd5ec2c8185629740360f99e05f58d925713d8ff2c94fd045f5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.3.3 CPython/3.14.3 Darwin/25.4.0
|
Release files / lunary-1.4.41-py3-none-any.whl
| Download URL | lunary-1.4.41-py3-none-any.whl |
|---|---|
| Size | 32.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
25b51a7a56db2063788f911251ef3297c30f867b47a02a34ffc7548e18f2dec6
|
|
BLAKE2b-256 checksum How to use checksums |
6fa2d4bd511d639bdb742cfad84d2061787540969de56012f4d8aa2d9c9bc4d1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.3.3 CPython/3.14.3 Darwin/25.4.0
|