A Python SDK for monitoring and analyzing AI API interactions with LLM services
Project description
Coolhand Python
Automatic monitoring for LLM API calls in Python applications.
Installation
pip install coolhand
Quick Start
import coolhand # Auto-initializes and starts monitoring
# All LLM API calls are now automatically captured
from openai import OpenAI
client = OpenAI()
response = client.chat.completions.create(
model="gpt-4",
messages=[{"role": "user", "content": "Hello!"}]
)
Manual Configuration
from coolhand import Coolhand
coolhand_client = Coolhand(
api_key='your-api-key',
silent=False, # Enable verbose logging
)
Environment Variables
COOLHAND_API_KEY: Your Coolhand API keyCOOLHAND_SILENT: Set tofalsefor verbose logging
Supported LLM APIs
Automatically captures requests to:
- OpenAI (api.openai.com)
- Anthropic (api.anthropic.com)
Requirements
- Python 3.7+
- httpx (for HTTP client patching)
License
Apache-2.0
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
coolhand-0.1.0.tar.gz
(23.7 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
coolhand-0.1.0-py3-none-any.whl
(12.7 kB
view details)
File details
Details for the file coolhand-0.1.0.tar.gz.
File metadata
- Download URL: coolhand-0.1.0.tar.gz
- Upload date:
- Size: 23.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c1edfa5fe8c8a06712be7838f0d80e61cae4a74235fe9b2d4bc9f72369edf298
|
|
| MD5 |
69abe31a1078c9b2a20e08b5ff6abcb5
|
|
| BLAKE2b-256 |
a80fa7be217104a83ecf287995008696f5771aea272c1fddfcccddcc20050eb1
|
File details
Details for the file coolhand-0.1.0-py3-none-any.whl.
File metadata
- Download URL: coolhand-0.1.0-py3-none-any.whl
- Upload date:
- Size: 12.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a175d54f99d942c93436f1f200abd1e070212f98ee52e4871521ca9b707003f4
|
|
| MD5 |
b4047951173abdfe9a128245a445d33e
|
|
| BLAKE2b-256 |
96d9eb86d19e5f0304476a5954b40f6f4246de34b352d59a61086a0e32e58468
|