Skip to content

Commit adad46c

Browse files
authored
Update README.md
1 parent 6344a4e commit adad46c

File tree

1 file changed

+16
-25
lines changed

1 file changed

+16
-25
lines changed

README.md

Lines changed: 16 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -4,41 +4,23 @@ A Python client for tracking and analyzing events and LLM interactions with Trub
44

55
## Overview
66

7-
Trubrics is a Python client that provides event tracking capabilities with a focus on LLM (Large Language Model) interactions. It features an efficient queuing system with automatic background flushing of events to the Trubrics API.
7+
Trubrics is a Python client that provides event tracking capabilities with a focus on LLM (Large Language Model) interactions. It is fast and non-blocking, meaning there will be no performance hits to your LLM app. It features an efficient queuing system with automatic background flushing of events to the Trubrics API.
88

99
## Installation
1010

11-
Install using pip:
1211
``` bash
1312
pip install trubrics
1413
```
1514

16-
Or using uv:
17-
18-
``` bash
19-
pip install uv
20-
uv pip install trubrics
21-
```
22-
23-
## Key Features
24-
25-
- Event tracking with custom properties
26-
- Automatic background event flushing
27-
- Thread-safe implementation
28-
- Configurable flush intervals and batch sizes
29-
3015
## Usage
3116

32-
### Basic Setup
17+
### Setup
3318

19+
Get your project API key from settings in [Trubrics](https://app.trubrics.com/). This is a POST only API key.
3420
``` python
3521
from trubrics import Trubrics
3622

37-
client = Trubrics(
38-
api_key="your-api-key",
39-
flush_interval=10, # seconds
40-
flush_at=20, # events
41-
)
23+
client = Trubrics(api_key="your-api-key")
4224
```
4325

4426
### Tracking Events
@@ -65,7 +47,7 @@ client.track_llm(
6547
### Closing the Client
6648

6749
``` python
68-
# Ensure all events are flushed before shutting down
50+
# optional closing method to ensure all events are flushed from the queue before exiting your app
6951
client.close()
7052
```
7153

@@ -84,9 +66,18 @@ Or specify your own logger completely:
8466
trubrics = Trubrics(api_key="your-api-key", logger=your_cool_logger)
8567
```
8668

87-
## Configuration Options
69+
## Other Client Configuration Options
70+
71+
``` python
72+
from trubrics import Trubrics
73+
74+
client = Trubrics(
75+
api_key="your-api-key",
76+
flush_interval=20,
77+
flush_at=10,
78+
)
79+
```
8880

89-
- api_key: Your Trubrics API key
9081
- flush_interval: Time in seconds between automatic flushes (default: 10)
9182
- flush_at: Number of events that trigger a flush (default: 20)
9283

0 commit comments

Comments
 (0)