Skip to content

Commit d0b8e4f

Browse files
Automatically update Python SDK
1 parent b5cd421 commit d0b8e4f

File tree

2 files changed

+16
-14
lines changed

2 files changed

+16
-14
lines changed

README.md

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -25,17 +25,19 @@ The package needs to be configured with your account's API key which is availabl
2525
dashboard.
2626

2727
```python
28-
from trophy import TrophyApiClient
29-
30-
client = TrophyApiClient(api_key='your-api-key')
31-
32-
# Send a metric event
33-
client.metrics.event("words-written", {
34-
"user": {
35-
"id": "18",
36-
"email": "jk.rowling@harrypotter.com",
37-
"tz": "Europe/London"
38-
},
39-
"value": 750
40-
})
28+
from trophy import EventRequestUser, TrophyApi
29+
30+
client = TrophyApi(
31+
api_key="YOUR_API_KEY",
32+
)
33+
34+
client.metrics.event(
35+
key="words-written",
36+
user=EventRequestUser(
37+
id="18",
38+
email="jk.rowling@harrypotter.com",
39+
tz="Europe/London",
40+
),
41+
value=750.0,
42+
)
4143
```

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "trophy"
7-
version = "0.1.7"
7+
version = "0.1.8"
88
description = "A Python library for the Trophy API"
99
license = {text = "MIT"}
1010
readme = "README.md"

0 commit comments

Comments
 (0)