agentscore-py 2.4.1__tar.gz → 2.4.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.
- {agentscore_py-2.4.1 → agentscore_py-2.4.3}/PKG-INFO +3 -3
- {agentscore_py-2.4.1 → agentscore_py-2.4.3}/README.md +2 -2
- {agentscore_py-2.4.1 → agentscore_py-2.4.3}/agentscore/client.py +3 -1
- {agentscore_py-2.4.1 → agentscore_py-2.4.3}/pyproject.toml +1 -1
- {agentscore_py-2.4.1 → agentscore_py-2.4.3}/tests/test_client.py +1 -1
- {agentscore_py-2.4.1 → agentscore_py-2.4.3}/uv.lock +1 -1
- {agentscore_py-2.4.1 → agentscore_py-2.4.3}/.claude/CLAUDE.md +0 -0
- {agentscore_py-2.4.1 → agentscore_py-2.4.3}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
- {agentscore_py-2.4.1 → agentscore_py-2.4.3}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
- {agentscore_py-2.4.1 → agentscore_py-2.4.3}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
- {agentscore_py-2.4.1 → agentscore_py-2.4.3}/.github/dependabot.yml +0 -0
- {agentscore_py-2.4.1 → agentscore_py-2.4.3}/.github/workflows/ci.yml +0 -0
- {agentscore_py-2.4.1 → agentscore_py-2.4.3}/.github/workflows/publish.yml +0 -0
- {agentscore_py-2.4.1 → agentscore_py-2.4.3}/.github/workflows/security.yml +0 -0
- {agentscore_py-2.4.1 → agentscore_py-2.4.3}/.gitignore +0 -0
- {agentscore_py-2.4.1 → agentscore_py-2.4.3}/CODE_OF_CONDUCT.md +0 -0
- {agentscore_py-2.4.1 → agentscore_py-2.4.3}/CONTRIBUTING.md +0 -0
- {agentscore_py-2.4.1 → agentscore_py-2.4.3}/LICENSE +0 -0
- {agentscore_py-2.4.1 → agentscore_py-2.4.3}/SECURITY.md +0 -0
- {agentscore_py-2.4.1 → agentscore_py-2.4.3}/agentscore/__init__.py +0 -0
- {agentscore_py-2.4.1 → agentscore_py-2.4.3}/agentscore/errors.py +0 -0
- {agentscore_py-2.4.1 → agentscore_py-2.4.3}/agentscore/py.typed +0 -0
- {agentscore_py-2.4.1 → agentscore_py-2.4.3}/agentscore/test_mode.py +0 -0
- {agentscore_py-2.4.1 → agentscore_py-2.4.3}/agentscore/types.py +0 -0
- {agentscore_py-2.4.1 → agentscore_py-2.4.3}/lefthook.yml +0 -0
- {agentscore_py-2.4.1 → agentscore_py-2.4.3}/ruff.toml +0 -0
- {agentscore_py-2.4.1 → agentscore_py-2.4.3}/tests/__init__.py +0 -0
- {agentscore_py-2.4.1 → agentscore_py-2.4.3}/tests/conftest.py +0 -0
- {agentscore_py-2.4.1 → agentscore_py-2.4.3}/tests/test_errors.py +0 -0
- {agentscore_py-2.4.1 → agentscore_py-2.4.3}/tests/test_integration.py +0 -0
- {agentscore_py-2.4.1 → agentscore_py-2.4.3}/tests/test_test_mode.py +0 -0
- {agentscore_py-2.4.1 → agentscore_py-2.4.3}/tests/test_types.py +0 -0
- {agentscore_py-2.4.1 → agentscore_py-2.4.3}/vulture_whitelist.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: agentscore-py
|
|
3
|
-
Version: 2.4.
|
|
3
|
+
Version: 2.4.3
|
|
4
4
|
Summary: Python client for the AgentScore APIs
|
|
5
5
|
Project-URL: Homepage, https://agentscore.sh
|
|
6
6
|
Project-URL: Repository, https://github.com/agentscore/python-sdk
|
|
@@ -184,7 +184,7 @@ with AgentScore(api_key="as_live_...") as client:
|
|
|
184
184
|
|
|
185
185
|
| Parameter | Default | Description |
|
|
186
186
|
|---------------|-----------------------------|--------------------------|
|
|
187
|
-
| `api_key` |
|
|
187
|
+
| `api_key` | _(required)_ | API key from [agentscore.sh](https://agentscore.sh); raises `ValueError` if missing |
|
|
188
188
|
| `base_url` | `https://api.agentscore.sh` | API base URL |
|
|
189
189
|
| `timeout` | `10.0` | Request timeout (seconds)|
|
|
190
190
|
| `user_agent` | `None` | Prepended to the default `User-Agent` as `"{user_agent} (agentscore-py/{version})"`. Use to attribute API calls to your app. |
|
|
@@ -234,7 +234,7 @@ except QuotaExceededError as e:
|
|
|
234
234
|
except AgentScoreTimeoutError:
|
|
235
235
|
print("Network timeout — retry with backoff.")
|
|
236
236
|
except AgentScoreError as e:
|
|
237
|
-
print(e.code, e
|
|
237
|
+
print(e.code, str(e))
|
|
238
238
|
```
|
|
239
239
|
|
|
240
240
|
## Quota observability
|
|
@@ -161,7 +161,7 @@ with AgentScore(api_key="as_live_...") as client:
|
|
|
161
161
|
|
|
162
162
|
| Parameter | Default | Description |
|
|
163
163
|
|---------------|-----------------------------|--------------------------|
|
|
164
|
-
| `api_key` |
|
|
164
|
+
| `api_key` | _(required)_ | API key from [agentscore.sh](https://agentscore.sh); raises `ValueError` if missing |
|
|
165
165
|
| `base_url` | `https://api.agentscore.sh` | API base URL |
|
|
166
166
|
| `timeout` | `10.0` | Request timeout (seconds)|
|
|
167
167
|
| `user_agent` | `None` | Prepended to the default `User-Agent` as `"{user_agent} (agentscore-py/{version})"`. Use to attribute API calls to your app. |
|
|
@@ -211,7 +211,7 @@ except QuotaExceededError as e:
|
|
|
211
211
|
except AgentScoreTimeoutError:
|
|
212
212
|
print("Network timeout — retry with backoff.")
|
|
213
213
|
except AgentScoreError as e:
|
|
214
|
-
print(e.code, e
|
|
214
|
+
print(e.code, str(e))
|
|
215
215
|
```
|
|
216
216
|
|
|
217
217
|
## Quota observability
|
|
@@ -93,7 +93,9 @@ def _build_error_from_response(response: httpx.Response) -> AgentScoreError:
|
|
|
93
93
|
dedicated subclass for.
|
|
94
94
|
"""
|
|
95
95
|
code = "unknown_error"
|
|
96
|
-
message
|
|
96
|
+
# Concise default, overridden by ``error.message`` when the body carries one. The raw
|
|
97
|
+
# body, when it is JSON, is preserved in ``details`` below.
|
|
98
|
+
message = f"Request failed with status {response.status_code}"
|
|
97
99
|
details: dict[str, Any] = {}
|
|
98
100
|
|
|
99
101
|
try:
|
|
@@ -2219,7 +2219,7 @@ async def test_aassess_connect_error_wraps_to_network_error():
|
|
|
2219
2219
|
@respx.mock
|
|
2220
2220
|
def test_error_body_non_dict_json_falls_through_to_defaults():
|
|
2221
2221
|
"""When the error body parses to JSON that is NOT a dict (e.g. a list), the SDK keeps
|
|
2222
|
-
code='unknown_error' and message
|
|
2222
|
+
code='unknown_error' and a status-based default message rather than crashing."""
|
|
2223
2223
|
respx.post(f"{BASE_URL}/v1/assess").mock(
|
|
2224
2224
|
return_value=httpx.Response(500, json=["oops", "not", "a", "dict"]),
|
|
2225
2225
|
)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|