calibrate-python-sdk 0.0.1__tar.gz → 0.0.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {calibrate_python_sdk-0.0.1 → calibrate_python_sdk-0.0.3}/PKG-INFO +3 -5
- calibrate_python_sdk-0.0.3/README.md +19 -0
- {calibrate_python_sdk-0.0.1 → calibrate_python_sdk-0.0.3}/pyproject.toml +1 -1
- {calibrate_python_sdk-0.0.1 → calibrate_python_sdk-0.0.3}/src/artpark/agent_tests/client.py +6 -12
- {calibrate_python_sdk-0.0.1 → calibrate_python_sdk-0.0.3}/src/artpark/agents/client.py +4 -8
- {calibrate_python_sdk-0.0.1 → calibrate_python_sdk-0.0.3}/src/artpark/client.py +12 -25
- {calibrate_python_sdk-0.0.1 → calibrate_python_sdk-0.0.3}/src/artpark/core/client_wrapper.py +9 -23
- {calibrate_python_sdk-0.0.1 → calibrate_python_sdk-0.0.3}/src/artpark/environment.py +1 -1
- calibrate_python_sdk-0.0.1/README.md +0 -21
- {calibrate_python_sdk-0.0.1 → calibrate_python_sdk-0.0.3}/LICENSE +0 -0
- {calibrate_python_sdk-0.0.1 → calibrate_python_sdk-0.0.3}/src/artpark/__init__.py +0 -0
- {calibrate_python_sdk-0.0.1 → calibrate_python_sdk-0.0.3}/src/artpark/_default_clients.py +0 -0
- {calibrate_python_sdk-0.0.1 → calibrate_python_sdk-0.0.3}/src/artpark/agent_tests/__init__.py +0 -0
- {calibrate_python_sdk-0.0.1 → calibrate_python_sdk-0.0.3}/src/artpark/agent_tests/raw_client.py +0 -0
- {calibrate_python_sdk-0.0.1 → calibrate_python_sdk-0.0.3}/src/artpark/agents/__init__.py +0 -0
- {calibrate_python_sdk-0.0.1 → calibrate_python_sdk-0.0.3}/src/artpark/agents/raw_client.py +0 -0
- {calibrate_python_sdk-0.0.1 → calibrate_python_sdk-0.0.3}/src/artpark/core/__init__.py +0 -0
- {calibrate_python_sdk-0.0.1 → calibrate_python_sdk-0.0.3}/src/artpark/core/api_error.py +0 -0
- {calibrate_python_sdk-0.0.1 → calibrate_python_sdk-0.0.3}/src/artpark/core/datetime_utils.py +0 -0
- {calibrate_python_sdk-0.0.1 → calibrate_python_sdk-0.0.3}/src/artpark/core/file.py +0 -0
- {calibrate_python_sdk-0.0.1 → calibrate_python_sdk-0.0.3}/src/artpark/core/force_multipart.py +0 -0
- {calibrate_python_sdk-0.0.1 → calibrate_python_sdk-0.0.3}/src/artpark/core/http_client.py +0 -0
- {calibrate_python_sdk-0.0.1 → calibrate_python_sdk-0.0.3}/src/artpark/core/http_response.py +0 -0
- {calibrate_python_sdk-0.0.1 → calibrate_python_sdk-0.0.3}/src/artpark/core/http_sse/__init__.py +0 -0
- {calibrate_python_sdk-0.0.1 → calibrate_python_sdk-0.0.3}/src/artpark/core/http_sse/_api.py +0 -0
- {calibrate_python_sdk-0.0.1 → calibrate_python_sdk-0.0.3}/src/artpark/core/http_sse/_decoders.py +0 -0
- {calibrate_python_sdk-0.0.1 → calibrate_python_sdk-0.0.3}/src/artpark/core/http_sse/_exceptions.py +0 -0
- {calibrate_python_sdk-0.0.1 → calibrate_python_sdk-0.0.3}/src/artpark/core/http_sse/_models.py +0 -0
- {calibrate_python_sdk-0.0.1 → calibrate_python_sdk-0.0.3}/src/artpark/core/jsonable_encoder.py +0 -0
- {calibrate_python_sdk-0.0.1 → calibrate_python_sdk-0.0.3}/src/artpark/core/logging.py +0 -0
- {calibrate_python_sdk-0.0.1 → calibrate_python_sdk-0.0.3}/src/artpark/core/parse_error.py +0 -0
- {calibrate_python_sdk-0.0.1 → calibrate_python_sdk-0.0.3}/src/artpark/core/pydantic_utilities.py +0 -0
- {calibrate_python_sdk-0.0.1 → calibrate_python_sdk-0.0.3}/src/artpark/core/query_encoder.py +0 -0
- {calibrate_python_sdk-0.0.1 → calibrate_python_sdk-0.0.3}/src/artpark/core/remove_none_from_dict.py +0 -0
- {calibrate_python_sdk-0.0.1 → calibrate_python_sdk-0.0.3}/src/artpark/core/request_options.py +0 -0
- {calibrate_python_sdk-0.0.1 → calibrate_python_sdk-0.0.3}/src/artpark/core/serialization.py +0 -0
- {calibrate_python_sdk-0.0.1 → calibrate_python_sdk-0.0.3}/src/artpark/errors/__init__.py +0 -0
- {calibrate_python_sdk-0.0.1 → calibrate_python_sdk-0.0.3}/src/artpark/errors/unprocessable_entity_error.py +0 -0
- {calibrate_python_sdk-0.0.1 → calibrate_python_sdk-0.0.3}/src/artpark/py.typed +0 -0
- {calibrate_python_sdk-0.0.1 → calibrate_python_sdk-0.0.3}/src/artpark/types/__init__.py +0 -0
- {calibrate_python_sdk-0.0.1 → calibrate_python_sdk-0.0.3}/src/artpark/types/batch_run_request.py +0 -0
- {calibrate_python_sdk-0.0.1 → calibrate_python_sdk-0.0.3}/src/artpark/types/batch_test_run.py +0 -0
- {calibrate_python_sdk-0.0.1 → calibrate_python_sdk-0.0.3}/src/artpark/types/batch_test_run_response.py +0 -0
- {calibrate_python_sdk-0.0.1 → calibrate_python_sdk-0.0.3}/src/artpark/types/batch_test_skip.py +0 -0
- {calibrate_python_sdk-0.0.1 → calibrate_python_sdk-0.0.3}/src/artpark/types/http_validation_error.py +0 -0
- {calibrate_python_sdk-0.0.1 → calibrate_python_sdk-0.0.3}/src/artpark/types/judge_result.py +0 -0
- {calibrate_python_sdk-0.0.1 → calibrate_python_sdk-0.0.3}/src/artpark/types/resolve_agent_names_response.py +0 -0
- {calibrate_python_sdk-0.0.1 → calibrate_python_sdk-0.0.3}/src/artpark/types/routers_agent_tests_agent_response.py +0 -0
- {calibrate_python_sdk-0.0.1 → calibrate_python_sdk-0.0.3}/src/artpark/types/routers_agent_tests_agent_response_type.py +0 -0
- {calibrate_python_sdk-0.0.1 → calibrate_python_sdk-0.0.3}/src/artpark/types/task_create_response.py +0 -0
- {calibrate_python_sdk-0.0.1 → calibrate_python_sdk-0.0.3}/src/artpark/types/test_case_result.py +0 -0
- {calibrate_python_sdk-0.0.1 → calibrate_python_sdk-0.0.3}/src/artpark/types/test_output.py +0 -0
- {calibrate_python_sdk-0.0.1 → calibrate_python_sdk-0.0.3}/src/artpark/types/test_run_status_response.py +0 -0
- {calibrate_python_sdk-0.0.1 → calibrate_python_sdk-0.0.3}/src/artpark/types/tool_call_output.py +0 -0
- {calibrate_python_sdk-0.0.1 → calibrate_python_sdk-0.0.3}/src/artpark/types/validation_error.py +0 -0
- {calibrate_python_sdk-0.0.1 → calibrate_python_sdk-0.0.3}/src/artpark/types/validation_error_loc_item.py +0 -0
- {calibrate_python_sdk-0.0.1 → calibrate_python_sdk-0.0.3}/src/artpark/version.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: calibrate-python-sdk
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.3
|
|
4
4
|
Summary:
|
|
5
5
|
License: MIT
|
|
6
6
|
Requires-Python: >=3.10,<4.0
|
|
@@ -33,7 +33,7 @@ Description-Content-Type: text/markdown
|
|
|
33
33
|
|
|
34
34
|
# Calibrate Python SDK
|
|
35
35
|
|
|
36
|
-
Python client for
|
|
36
|
+
Python client for [Calibrate](https://calibrate.artpark.ai), a framework for evaluating AI agents which let you move from slow, manual testing to a fast, automated, and repeatable testing process for your entire agent stack.
|
|
37
37
|
|
|
38
38
|
## Installation
|
|
39
39
|
|
|
@@ -46,10 +46,8 @@ pip install calibrate-python-sdk
|
|
|
46
46
|
```python
|
|
47
47
|
from calibrate_python_sdk import Calibrate
|
|
48
48
|
|
|
49
|
-
client = Calibrate(
|
|
49
|
+
client = Calibrate(api_key="sk_your_api_key") # get the API key from the UI
|
|
50
50
|
|
|
51
51
|
agents = client.agents.list()
|
|
52
52
|
```
|
|
53
53
|
|
|
54
|
-
This SDK is generated from Calibrate's public API with [Fern](https://buildwithfern.com).
|
|
55
|
-
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Calibrate Python SDK
|
|
2
|
+
|
|
3
|
+
Python client for [Calibrate](https://calibrate.artpark.ai), a framework for evaluating AI agents which let you move from slow, manual testing to a fast, automated, and repeatable testing process for your entire agent stack.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
pip install calibrate-python-sdk
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
```python
|
|
14
|
+
from calibrate_python_sdk import Calibrate
|
|
15
|
+
|
|
16
|
+
client = Calibrate(api_key="sk_your_api_key") # get the API key from the UI
|
|
17
|
+
|
|
18
|
+
agents = client.agents.list()
|
|
19
|
+
```
|
|
@@ -66,9 +66,8 @@ class AgentTestsClient:
|
|
|
66
66
|
from artpark import Calibrate
|
|
67
67
|
|
|
68
68
|
client = Calibrate(
|
|
69
|
-
api_key="YOUR_API_KEY",
|
|
70
69
|
org_uuid="YOUR_ORG_UUID",
|
|
71
|
-
|
|
70
|
+
api_key="YOUR_API_KEY",
|
|
72
71
|
)
|
|
73
72
|
client.agent_tests.run(
|
|
74
73
|
agent_uuid="agent_uuid",
|
|
@@ -120,9 +119,8 @@ class AgentTestsClient:
|
|
|
120
119
|
from artpark import BatchRunRequest, Calibrate
|
|
121
120
|
|
|
122
121
|
client = Calibrate(
|
|
123
|
-
api_key="YOUR_API_KEY",
|
|
124
122
|
org_uuid="YOUR_ORG_UUID",
|
|
125
|
-
|
|
123
|
+
api_key="YOUR_API_KEY",
|
|
126
124
|
)
|
|
127
125
|
client.agent_tests.run_batch(
|
|
128
126
|
request=BatchRunRequest(),
|
|
@@ -161,9 +159,8 @@ class AgentTestsClient:
|
|
|
161
159
|
from artpark import Calibrate
|
|
162
160
|
|
|
163
161
|
client = Calibrate(
|
|
164
|
-
api_key="YOUR_API_KEY",
|
|
165
162
|
org_uuid="YOUR_ORG_UUID",
|
|
166
|
-
|
|
163
|
+
api_key="YOUR_API_KEY",
|
|
167
164
|
)
|
|
168
165
|
client.agent_tests.get_run(
|
|
169
166
|
task_id="task_id",
|
|
@@ -227,9 +224,8 @@ class AsyncAgentTestsClient:
|
|
|
227
224
|
from artpark import AsyncCalibrate
|
|
228
225
|
|
|
229
226
|
client = AsyncCalibrate(
|
|
230
|
-
api_key="YOUR_API_KEY",
|
|
231
227
|
org_uuid="YOUR_ORG_UUID",
|
|
232
|
-
|
|
228
|
+
api_key="YOUR_API_KEY",
|
|
233
229
|
)
|
|
234
230
|
|
|
235
231
|
|
|
@@ -289,9 +285,8 @@ class AsyncAgentTestsClient:
|
|
|
289
285
|
from artpark import AsyncCalibrate, BatchRunRequest
|
|
290
286
|
|
|
291
287
|
client = AsyncCalibrate(
|
|
292
|
-
api_key="YOUR_API_KEY",
|
|
293
288
|
org_uuid="YOUR_ORG_UUID",
|
|
294
|
-
|
|
289
|
+
api_key="YOUR_API_KEY",
|
|
295
290
|
)
|
|
296
291
|
|
|
297
292
|
|
|
@@ -338,9 +333,8 @@ class AsyncAgentTestsClient:
|
|
|
338
333
|
from artpark import AsyncCalibrate
|
|
339
334
|
|
|
340
335
|
client = AsyncCalibrate(
|
|
341
|
-
api_key="YOUR_API_KEY",
|
|
342
336
|
org_uuid="YOUR_ORG_UUID",
|
|
343
|
-
|
|
337
|
+
api_key="YOUR_API_KEY",
|
|
344
338
|
)
|
|
345
339
|
|
|
346
340
|
|
|
@@ -56,9 +56,8 @@ class AgentsClient:
|
|
|
56
56
|
from artpark import Calibrate
|
|
57
57
|
|
|
58
58
|
client = Calibrate(
|
|
59
|
-
api_key="YOUR_API_KEY",
|
|
60
59
|
org_uuid="YOUR_ORG_UUID",
|
|
61
|
-
|
|
60
|
+
api_key="YOUR_API_KEY",
|
|
62
61
|
)
|
|
63
62
|
client.agents.resolve(
|
|
64
63
|
names=["names"],
|
|
@@ -93,9 +92,8 @@ class AgentsClient:
|
|
|
93
92
|
from artpark import Calibrate
|
|
94
93
|
|
|
95
94
|
client = Calibrate(
|
|
96
|
-
api_key="YOUR_API_KEY",
|
|
97
95
|
org_uuid="YOUR_ORG_UUID",
|
|
98
|
-
|
|
96
|
+
api_key="YOUR_API_KEY",
|
|
99
97
|
)
|
|
100
98
|
client.agents.list()
|
|
101
99
|
"""
|
|
@@ -149,9 +147,8 @@ class AsyncAgentsClient:
|
|
|
149
147
|
from artpark import AsyncCalibrate
|
|
150
148
|
|
|
151
149
|
client = AsyncCalibrate(
|
|
152
|
-
api_key="YOUR_API_KEY",
|
|
153
150
|
org_uuid="YOUR_ORG_UUID",
|
|
154
|
-
|
|
151
|
+
api_key="YOUR_API_KEY",
|
|
155
152
|
)
|
|
156
153
|
|
|
157
154
|
|
|
@@ -194,9 +191,8 @@ class AsyncAgentsClient:
|
|
|
194
191
|
from artpark import AsyncCalibrate
|
|
195
192
|
|
|
196
193
|
client = AsyncCalibrate(
|
|
197
|
-
api_key="YOUR_API_KEY",
|
|
198
194
|
org_uuid="YOUR_ORG_UUID",
|
|
199
|
-
|
|
195
|
+
api_key="YOUR_API_KEY",
|
|
200
196
|
)
|
|
201
197
|
|
|
202
198
|
|
|
@@ -28,13 +28,12 @@ class Calibrate:
|
|
|
28
28
|
|
|
29
29
|
|
|
30
30
|
|
|
31
|
-
Defaults to CalibrateEnvironment.
|
|
31
|
+
Defaults to CalibrateEnvironment.DEFAULT
|
|
32
32
|
|
|
33
33
|
|
|
34
34
|
|
|
35
|
-
api_key : typing.Optional[str]
|
|
36
35
|
org_uuid : typing.Optional[str]
|
|
37
|
-
|
|
36
|
+
api_key : str
|
|
38
37
|
headers : typing.Optional[typing.Dict[str, str]]
|
|
39
38
|
Additional headers to send with every request.
|
|
40
39
|
|
|
@@ -64,9 +63,8 @@ class Calibrate:
|
|
|
64
63
|
from artpark import Calibrate
|
|
65
64
|
|
|
66
65
|
client = Calibrate(
|
|
67
|
-
api_key="YOUR_API_KEY",
|
|
68
66
|
org_uuid="YOUR_ORG_UUID",
|
|
69
|
-
|
|
67
|
+
api_key="YOUR_API_KEY",
|
|
70
68
|
)
|
|
71
69
|
"""
|
|
72
70
|
|
|
@@ -74,10 +72,9 @@ class Calibrate:
|
|
|
74
72
|
self,
|
|
75
73
|
*,
|
|
76
74
|
base_url: typing.Optional[str] = None,
|
|
77
|
-
environment: CalibrateEnvironment = CalibrateEnvironment.
|
|
78
|
-
api_key: typing.Optional[str] = None,
|
|
75
|
+
environment: CalibrateEnvironment = CalibrateEnvironment.DEFAULT,
|
|
79
76
|
org_uuid: typing.Optional[str] = None,
|
|
80
|
-
|
|
77
|
+
api_key: str,
|
|
81
78
|
headers: typing.Optional[typing.Dict[str, str]] = None,
|
|
82
79
|
timeout: typing.Optional[float] = None,
|
|
83
80
|
max_retries: typing.Optional[int] = None,
|
|
@@ -91,9 +88,8 @@ class Calibrate:
|
|
|
91
88
|
_defaulted_max_retries = max_retries if max_retries is not None else 2
|
|
92
89
|
self._client_wrapper = SyncClientWrapper(
|
|
93
90
|
base_url=_get_base_url(base_url=base_url, environment=environment),
|
|
94
|
-
api_key=api_key,
|
|
95
91
|
org_uuid=org_uuid,
|
|
96
|
-
|
|
92
|
+
api_key=api_key,
|
|
97
93
|
headers=headers,
|
|
98
94
|
httpx_client=httpx_client
|
|
99
95
|
if httpx_client is not None
|
|
@@ -158,19 +154,15 @@ class AsyncCalibrate:
|
|
|
158
154
|
|
|
159
155
|
|
|
160
156
|
|
|
161
|
-
Defaults to CalibrateEnvironment.
|
|
157
|
+
Defaults to CalibrateEnvironment.DEFAULT
|
|
162
158
|
|
|
163
159
|
|
|
164
160
|
|
|
165
|
-
api_key : typing.Optional[str]
|
|
166
161
|
org_uuid : typing.Optional[str]
|
|
167
|
-
|
|
162
|
+
api_key : str
|
|
168
163
|
headers : typing.Optional[typing.Dict[str, str]]
|
|
169
164
|
Additional headers to send with every request.
|
|
170
165
|
|
|
171
|
-
async_token : typing.Optional[typing.Callable[[], typing.Awaitable[str]]]
|
|
172
|
-
An async callable that returns a bearer token. Use this when token acquisition involves async I/O (e.g., refreshing tokens via an async HTTP client). When provided, this is used instead of the synchronous token for async requests.
|
|
173
|
-
|
|
174
166
|
timeout : typing.Optional[float]
|
|
175
167
|
The timeout to be used, in seconds, for requests. By default the timeout is 60 seconds, unless a custom httpx client is used, in which case this default is not enforced.
|
|
176
168
|
|
|
@@ -197,9 +189,8 @@ class AsyncCalibrate:
|
|
|
197
189
|
from artpark import AsyncCalibrate
|
|
198
190
|
|
|
199
191
|
client = AsyncCalibrate(
|
|
200
|
-
api_key="YOUR_API_KEY",
|
|
201
192
|
org_uuid="YOUR_ORG_UUID",
|
|
202
|
-
|
|
193
|
+
api_key="YOUR_API_KEY",
|
|
203
194
|
)
|
|
204
195
|
"""
|
|
205
196
|
|
|
@@ -207,12 +198,10 @@ class AsyncCalibrate:
|
|
|
207
198
|
self,
|
|
208
199
|
*,
|
|
209
200
|
base_url: typing.Optional[str] = None,
|
|
210
|
-
environment: CalibrateEnvironment = CalibrateEnvironment.
|
|
211
|
-
api_key: typing.Optional[str] = None,
|
|
201
|
+
environment: CalibrateEnvironment = CalibrateEnvironment.DEFAULT,
|
|
212
202
|
org_uuid: typing.Optional[str] = None,
|
|
213
|
-
|
|
203
|
+
api_key: str,
|
|
214
204
|
headers: typing.Optional[typing.Dict[str, str]] = None,
|
|
215
|
-
async_token: typing.Optional[typing.Callable[[], typing.Awaitable[str]]] = None,
|
|
216
205
|
timeout: typing.Optional[float] = None,
|
|
217
206
|
max_retries: typing.Optional[int] = None,
|
|
218
207
|
stream_reconnection_enabled: typing.Optional[bool] = None,
|
|
@@ -225,11 +214,9 @@ class AsyncCalibrate:
|
|
|
225
214
|
_defaulted_max_retries = max_retries if max_retries is not None else 2
|
|
226
215
|
self._client_wrapper = AsyncClientWrapper(
|
|
227
216
|
base_url=_get_base_url(base_url=base_url, environment=environment),
|
|
228
|
-
api_key=api_key,
|
|
229
217
|
org_uuid=org_uuid,
|
|
230
|
-
|
|
218
|
+
api_key=api_key,
|
|
231
219
|
headers=headers,
|
|
232
|
-
async_token=async_token,
|
|
233
220
|
httpx_client=httpx_client
|
|
234
221
|
if httpx_client is not None
|
|
235
222
|
else _make_default_async_client(timeout=_defaulted_timeout, follow_redirects=follow_redirects),
|
{calibrate_python_sdk-0.0.1 → calibrate_python_sdk-0.0.3}/src/artpark/core/client_wrapper.py
RENAMED
|
@@ -11,9 +11,8 @@ class BaseClientWrapper:
|
|
|
11
11
|
def __init__(
|
|
12
12
|
self,
|
|
13
13
|
*,
|
|
14
|
-
api_key: typing.Optional[str] = None,
|
|
15
14
|
org_uuid: typing.Optional[str] = None,
|
|
16
|
-
|
|
15
|
+
api_key: str,
|
|
17
16
|
headers: typing.Optional[typing.Dict[str, str]] = None,
|
|
18
17
|
base_url: str,
|
|
19
18
|
timeout: typing.Optional[float] = None,
|
|
@@ -22,9 +21,8 @@ class BaseClientWrapper:
|
|
|
22
21
|
max_stream_reconnection_attempts: typing.Optional[int] = None,
|
|
23
22
|
logging: typing.Optional[typing.Union[LogConfig, Logger]] = None,
|
|
24
23
|
):
|
|
25
|
-
self._api_key = api_key
|
|
26
24
|
self._org_uuid = org_uuid
|
|
27
|
-
self.
|
|
25
|
+
self.api_key = api_key
|
|
28
26
|
self._headers = headers
|
|
29
27
|
self._base_url = base_url
|
|
30
28
|
self._timeout = timeout
|
|
@@ -37,27 +35,19 @@ class BaseClientWrapper:
|
|
|
37
35
|
import platform
|
|
38
36
|
|
|
39
37
|
headers: typing.Dict[str, str] = {
|
|
40
|
-
"User-Agent": "calibrate-python-sdk/0.0.
|
|
38
|
+
"User-Agent": "calibrate-python-sdk/0.0.3",
|
|
41
39
|
"X-Fern-Language": "Python",
|
|
42
40
|
"X-Fern-Runtime": f"python/{platform.python_version()}",
|
|
43
41
|
"X-Fern-Platform": f"{platform.system().lower()}/{platform.release()}",
|
|
44
42
|
"X-Fern-SDK-Name": "calibrate-python-sdk",
|
|
45
|
-
"X-Fern-SDK-Version": "0.0.
|
|
43
|
+
"X-Fern-SDK-Version": "0.0.3",
|
|
46
44
|
**(self.get_custom_headers() or {}),
|
|
47
45
|
}
|
|
48
|
-
if self._api_key is not None:
|
|
49
|
-
headers["X-API-Key"] = self._api_key
|
|
50
46
|
if self._org_uuid is not None:
|
|
51
47
|
headers["X-Org-UUID"] = self._org_uuid
|
|
52
|
-
headers["
|
|
48
|
+
headers["X-API-Key"] = self.api_key
|
|
53
49
|
return headers
|
|
54
50
|
|
|
55
|
-
def _get_token(self) -> str:
|
|
56
|
-
if isinstance(self._token, str):
|
|
57
|
-
return self._token
|
|
58
|
-
else:
|
|
59
|
-
return self._token()
|
|
60
|
-
|
|
61
51
|
def get_custom_headers(self) -> typing.Optional[typing.Dict[str, str]]:
|
|
62
52
|
return self._headers
|
|
63
53
|
|
|
@@ -81,9 +71,8 @@ class SyncClientWrapper(BaseClientWrapper):
|
|
|
81
71
|
def __init__(
|
|
82
72
|
self,
|
|
83
73
|
*,
|
|
84
|
-
api_key: typing.Optional[str] = None,
|
|
85
74
|
org_uuid: typing.Optional[str] = None,
|
|
86
|
-
|
|
75
|
+
api_key: str,
|
|
87
76
|
headers: typing.Optional[typing.Dict[str, str]] = None,
|
|
88
77
|
base_url: str,
|
|
89
78
|
timeout: typing.Optional[float] = None,
|
|
@@ -94,9 +83,8 @@ class SyncClientWrapper(BaseClientWrapper):
|
|
|
94
83
|
httpx_client: httpx.Client,
|
|
95
84
|
):
|
|
96
85
|
super().__init__(
|
|
97
|
-
api_key=api_key,
|
|
98
86
|
org_uuid=org_uuid,
|
|
99
|
-
|
|
87
|
+
api_key=api_key,
|
|
100
88
|
headers=headers,
|
|
101
89
|
base_url=base_url,
|
|
102
90
|
timeout=timeout,
|
|
@@ -119,9 +107,8 @@ class AsyncClientWrapper(BaseClientWrapper):
|
|
|
119
107
|
def __init__(
|
|
120
108
|
self,
|
|
121
109
|
*,
|
|
122
|
-
api_key: typing.Optional[str] = None,
|
|
123
110
|
org_uuid: typing.Optional[str] = None,
|
|
124
|
-
|
|
111
|
+
api_key: str,
|
|
125
112
|
headers: typing.Optional[typing.Dict[str, str]] = None,
|
|
126
113
|
base_url: str,
|
|
127
114
|
timeout: typing.Optional[float] = None,
|
|
@@ -133,9 +120,8 @@ class AsyncClientWrapper(BaseClientWrapper):
|
|
|
133
120
|
httpx_client: httpx.AsyncClient,
|
|
134
121
|
):
|
|
135
122
|
super().__init__(
|
|
136
|
-
api_key=api_key,
|
|
137
123
|
org_uuid=org_uuid,
|
|
138
|
-
|
|
124
|
+
api_key=api_key,
|
|
139
125
|
headers=headers,
|
|
140
126
|
base_url=base_url,
|
|
141
127
|
timeout=timeout,
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
# Calibrate Python SDK
|
|
2
|
-
|
|
3
|
-
Python client for the [Calibrate](https://pense-backend.artpark.ai) API.
|
|
4
|
-
|
|
5
|
-
## Installation
|
|
6
|
-
|
|
7
|
-
```sh
|
|
8
|
-
pip install calibrate-python-sdk
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
## Usage
|
|
12
|
-
|
|
13
|
-
```python
|
|
14
|
-
from calibrate_python_sdk import Calibrate
|
|
15
|
-
|
|
16
|
-
client = Calibrate(token="sk_your_api_key")
|
|
17
|
-
|
|
18
|
-
agents = client.agents.list()
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
This SDK is generated from Calibrate's public API with [Fern](https://buildwithfern.com).
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{calibrate_python_sdk-0.0.1 → calibrate_python_sdk-0.0.3}/src/artpark/agent_tests/__init__.py
RENAMED
|
File without changes
|
{calibrate_python_sdk-0.0.1 → calibrate_python_sdk-0.0.3}/src/artpark/agent_tests/raw_client.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{calibrate_python_sdk-0.0.1 → calibrate_python_sdk-0.0.3}/src/artpark/core/datetime_utils.py
RENAMED
|
File without changes
|
|
File without changes
|
{calibrate_python_sdk-0.0.1 → calibrate_python_sdk-0.0.3}/src/artpark/core/force_multipart.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{calibrate_python_sdk-0.0.1 → calibrate_python_sdk-0.0.3}/src/artpark/core/http_sse/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{calibrate_python_sdk-0.0.1 → calibrate_python_sdk-0.0.3}/src/artpark/core/http_sse/_decoders.py
RENAMED
|
File without changes
|
{calibrate_python_sdk-0.0.1 → calibrate_python_sdk-0.0.3}/src/artpark/core/http_sse/_exceptions.py
RENAMED
|
File without changes
|
{calibrate_python_sdk-0.0.1 → calibrate_python_sdk-0.0.3}/src/artpark/core/http_sse/_models.py
RENAMED
|
File without changes
|
{calibrate_python_sdk-0.0.1 → calibrate_python_sdk-0.0.3}/src/artpark/core/jsonable_encoder.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{calibrate_python_sdk-0.0.1 → calibrate_python_sdk-0.0.3}/src/artpark/core/pydantic_utilities.py
RENAMED
|
File without changes
|
|
File without changes
|
{calibrate_python_sdk-0.0.1 → calibrate_python_sdk-0.0.3}/src/artpark/core/remove_none_from_dict.py
RENAMED
|
File without changes
|
{calibrate_python_sdk-0.0.1 → calibrate_python_sdk-0.0.3}/src/artpark/core/request_options.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{calibrate_python_sdk-0.0.1 → calibrate_python_sdk-0.0.3}/src/artpark/types/batch_run_request.py
RENAMED
|
File without changes
|
{calibrate_python_sdk-0.0.1 → calibrate_python_sdk-0.0.3}/src/artpark/types/batch_test_run.py
RENAMED
|
File without changes
|
|
File without changes
|
{calibrate_python_sdk-0.0.1 → calibrate_python_sdk-0.0.3}/src/artpark/types/batch_test_skip.py
RENAMED
|
File without changes
|
{calibrate_python_sdk-0.0.1 → calibrate_python_sdk-0.0.3}/src/artpark/types/http_validation_error.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{calibrate_python_sdk-0.0.1 → calibrate_python_sdk-0.0.3}/src/artpark/types/task_create_response.py
RENAMED
|
File without changes
|
{calibrate_python_sdk-0.0.1 → calibrate_python_sdk-0.0.3}/src/artpark/types/test_case_result.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{calibrate_python_sdk-0.0.1 → calibrate_python_sdk-0.0.3}/src/artpark/types/tool_call_output.py
RENAMED
|
File without changes
|
{calibrate_python_sdk-0.0.1 → calibrate_python_sdk-0.0.3}/src/artpark/types/validation_error.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|