Skip to content

Commit 1ce5f79

Browse files
authored
Merge branch 'digitalocean:main' into feat/rate-limiting-helper
2 parents 05399b6 + b0966ab commit 1ce5f79

File tree

73 files changed

+4882
-909
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+4882
-909
lines changed

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "3.6.0"
2+
".": "3.8.0"
33
}

.stats.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
configured_endpoints: 175
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/digitalocean%2Fgradient-cb3bf9b21459cad24410206c27a32fd31ef6cf86711700597549dbbd0d634002.yml
3-
openapi_spec_hash: 6a9149a81ba15e7c5c5c1f4d77daad92
4-
config_hash: bad49c3bf949d5168ec3896bedff253a
1+
configured_endpoints: 188
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/digitalocean%2Fgradient-f07d74847e620dfa26d8df40ea4680814af9bba381b3a57a7b6ed76ad49d85f8.yml
3+
openapi_spec_hash: e3553dc2abf2afd4368b736bcc32a289
4+
config_hash: b28984dd49d4baf1d68572efe83ac103

CHANGELOG.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,40 @@
11
# Changelog
22

3+
## 3.8.0 (2025-11-20)
4+
5+
Full Changelog: [v3.7.0...v3.8.0](https://github.com/digitalocean/gradient-python/compare/v3.7.0...v3.8.0)
6+
7+
### Features
8+
9+
* **api:** manual updates ([244277b](https://github.com/digitalocean/gradient-python/commit/244277b483ac97f733e8f37e0b556cb49813b554))
10+
11+
## 3.7.0 (2025-11-19)
12+
13+
Full Changelog: [v3.6.0...v3.7.0](https://github.com/digitalocean/gradient-python/compare/v3.6.0...v3.7.0)
14+
15+
### Features
16+
17+
* add wait_for_completion method to IndexingJobs resource with sy… ([#49](https://github.com/digitalocean/gradient-python/issues/49)) ([9edc2a6](https://github.com/digitalocean/gradient-python/commit/9edc2a60f5aa49749e151477615bbecb3a79e92b))
18+
* Add wait_until_ready() method for agent deployment polling ([#56](https://github.com/digitalocean/gradient-python/issues/56)) ([dcef3d5](https://github.com/digitalocean/gradient-python/commit/dcef3d5ebb4ef903c0c91aa4008853bb978f5544))
19+
* **api:** add inference errors ([d61d495](https://github.com/digitalocean/gradient-python/commit/d61d4955f596d9ac1bebc9387a6573989e823022))
20+
* **api:** include indexing jobs ([d249d06](https://github.com/digitalocean/gradient-python/commit/d249d0606e26d585eb2b7859948a796ea7860f53))
21+
22+
23+
### Bug Fixes
24+
25+
* **client:** close streams without requiring full consumption ([33fe04b](https://github.com/digitalocean/gradient-python/commit/33fe04b2e4ab71094ee13e7b83d4c04867e7d485))
26+
* compat with Python 3.14 ([add7b21](https://github.com/digitalocean/gradient-python/commit/add7b21b9fbb8987641d5520da638647fe27b159))
27+
* **compat:** update signatures of `model_dump` and `model_dump_json` for Pydantic v1 ([c945870](https://github.com/digitalocean/gradient-python/commit/c945870a31840d553cb1e3a75314f1c884a56060))
28+
29+
30+
### Chores
31+
32+
* bump `httpx-aiohttp` version to 0.1.9 ([db39cc6](https://github.com/digitalocean/gradient-python/commit/db39cc63fb126ac81edfe2cb991493d10a2d0936))
33+
* **internal/tests:** avoid race condition with implicit client cleanup ([e0202bb](https://github.com/digitalocean/gradient-python/commit/e0202bb915613872095f7f223a49c4480e50be98))
34+
* **internal:** grammar fix (it's -> its) ([c6ffb3b](https://github.com/digitalocean/gradient-python/commit/c6ffb3becbcb99e36992934fac20d67a6a3b967c))
35+
* merge issues in test_client.py ([#87](https://github.com/digitalocean/gradient-python/issues/87)) ([62fc025](https://github.com/digitalocean/gradient-python/commit/62fc02512e941c6af18b11c19df8828cca31159d))
36+
* **package:** drop Python 3.8 support ([825b1e4](https://github.com/digitalocean/gradient-python/commit/825b1e4f8b257fc103c0d45743133bbc81ca3e10))
37+
338
## 3.6.0 (2025-10-16)
439

540
Full Changelog: [v3.5.0...v3.6.0](https://github.com/digitalocean/gradient-python/compare/v3.5.0...v3.6.0)

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
[![PyPI version](https://img.shields.io/pypi/v/gradient.svg?label=pypi%20(stable))](https://pypi.org/project/gradient/)
77
[![Docs](https://img.shields.io/badge/Docs-8A2BE2)](https://gradientai.digitalocean.com/getting-started/overview/)
88

9-
The Gradient Python library provides convenient access to the Gradient REST API from any Python 3.8+
9+
The Gradient Python library provides convenient access to the Gradient REST API from any Python 3.9+
1010
application. The library includes type definitions for all request params and response fields,
1111
and offers both synchronous and asynchronous clients powered by [httpx](https://github.com/encode/httpx).
1212

@@ -528,7 +528,7 @@ print(gradient.__version__)
528528

529529
## Requirements
530530

531-
Python 3.8 or higher.
531+
Python 3.9 or higher.
532532

533533
## Contributing
534534

api.md

Lines changed: 57 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -155,18 +155,6 @@ Methods:
155155
- <code title="get /v2/gen-ai/workspaces/{workspace_uuid}/agents">client.agents.evaluation_metrics.workspaces.agents.<a href="./src/gradient/resources/agents/evaluation_metrics/workspaces/agents.py">list</a>(workspace_uuid, \*\*<a href="src/gradient/types/agents/evaluation_metrics/workspaces/agent_list_params.py">params</a>) -> <a href="./src/gradient/types/agents/evaluation_metrics/workspaces/agent_list_response.py">AgentListResponse</a></code>
156156
- <code title="put /v2/gen-ai/workspaces/{workspace_uuid}/agents">client.agents.evaluation_metrics.workspaces.agents.<a href="./src/gradient/resources/agents/evaluation_metrics/workspaces/agents.py">move</a>(path_workspace_uuid, \*\*<a href="src/gradient/types/agents/evaluation_metrics/workspaces/agent_move_params.py">params</a>) -> <a href="./src/gradient/types/agents/evaluation_metrics/workspaces/agent_move_response.py">AgentMoveResponse</a></code>
157157

158-
### Models
159-
160-
Types:
161-
162-
```python
163-
from gradient.types.agents.evaluation_metrics import ModelListResponse
164-
```
165-
166-
Methods:
167-
168-
- <code title="get /v2/gen-ai/models">client.agents.evaluation_metrics.models.<a href="./src/gradient/resources/agents/evaluation_metrics/models.py">list</a>(\*\*<a href="src/gradient/types/agents/evaluation_metrics/model_list_params.py">params</a>) -> <a href="./src/gradient/types/agents/evaluation_metrics/model_list_response.py">ModelListResponse</a></code>
169-
170158
### Anthropic
171159

172160
#### Keys
@@ -243,6 +231,24 @@ Methods:
243231

244232
- <code title="post /v2/gen-ai/oauth2/dropbox/tokens">client.agents.evaluation_metrics.oauth2.dropbox.<a href="./src/gradient/resources/agents/evaluation_metrics/oauth2/dropbox.py">create_tokens</a>(\*\*<a href="src/gradient/types/agents/evaluation_metrics/oauth2/dropbox_create_tokens_params.py">params</a>) -> <a href="./src/gradient/types/agents/evaluation_metrics/oauth2/dropbox_create_tokens_response.py">DropboxCreateTokensResponse</a></code>
245233

234+
### ScheduledIndexing
235+
236+
Types:
237+
238+
```python
239+
from gradient.types.agents.evaluation_metrics import (
240+
ScheduledIndexingCreateResponse,
241+
ScheduledIndexingRetrieveResponse,
242+
ScheduledIndexingDeleteResponse,
243+
)
244+
```
245+
246+
Methods:
247+
248+
- <code title="post /v2/gen-ai/scheduled-indexing">client.agents.evaluation_metrics.scheduled_indexing.<a href="./src/gradient/resources/agents/evaluation_metrics/scheduled_indexing.py">create</a>(\*\*<a href="src/gradient/types/agents/evaluation_metrics/scheduled_indexing_create_params.py">params</a>) -> <a href="./src/gradient/types/agents/evaluation_metrics/scheduled_indexing_create_response.py">ScheduledIndexingCreateResponse</a></code>
249+
- <code title="get /v2/gen-ai/scheduled-indexing/knowledge-base/{knowledge_base_uuid}">client.agents.evaluation_metrics.scheduled_indexing.<a href="./src/gradient/resources/agents/evaluation_metrics/scheduled_indexing.py">retrieve</a>(knowledge_base_uuid) -> <a href="./src/gradient/types/agents/evaluation_metrics/scheduled_indexing_retrieve_response.py">ScheduledIndexingRetrieveResponse</a></code>
250+
- <code title="delete /v2/gen-ai/scheduled-indexing/{uuid}">client.agents.evaluation_metrics.scheduled_indexing.<a href="./src/gradient/resources/agents/evaluation_metrics/scheduled_indexing.py">delete</a>(uuid) -> <a href="./src/gradient/types/agents/evaluation_metrics/scheduled_indexing_delete_response.py">ScheduledIndexingDeleteResponse</a></code>
251+
246252
## EvaluationRuns
247253

248254
Types:
@@ -825,6 +831,7 @@ from gradient.types import (
825831
KnowledgeBaseUpdateResponse,
826832
KnowledgeBaseListResponse,
827833
KnowledgeBaseDeleteResponse,
834+
KnowledgeBaseListIndexingJobsResponse,
828835
)
829836
```
830837

@@ -835,6 +842,7 @@ Methods:
835842
- <code title="put /v2/gen-ai/knowledge_bases/{uuid}">client.knowledge_bases.<a href="./src/gradient/resources/knowledge_bases/knowledge_bases.py">update</a>(path_uuid, \*\*<a href="src/gradient/types/knowledge_base_update_params.py">params</a>) -> <a href="./src/gradient/types/knowledge_base_update_response.py">KnowledgeBaseUpdateResponse</a></code>
836843
- <code title="get /v2/gen-ai/knowledge_bases">client.knowledge_bases.<a href="./src/gradient/resources/knowledge_bases/knowledge_bases.py">list</a>(\*\*<a href="src/gradient/types/knowledge_base_list_params.py">params</a>) -> <a href="./src/gradient/types/knowledge_base_list_response.py">KnowledgeBaseListResponse</a></code>
837844
- <code title="delete /v2/gen-ai/knowledge_bases/{uuid}">client.knowledge_bases.<a href="./src/gradient/resources/knowledge_bases/knowledge_bases.py">delete</a>(uuid) -> <a href="./src/gradient/types/knowledge_base_delete_response.py">KnowledgeBaseDeleteResponse</a></code>
845+
- <code title="get /v2/gen-ai/knowledge_bases/{knowledge_base_uuid}/indexing_jobs">client.knowledge_bases.<a href="./src/gradient/resources/knowledge_bases/knowledge_bases.py">list_indexing_jobs</a>(knowledge_base_uuid) -> <a href="./src/gradient/types/knowledge_base_list_indexing_jobs_response.py">KnowledgeBaseListIndexingJobsResponse</a></code>
838846

839847
## DataSources
840848

@@ -873,6 +881,7 @@ from gradient.types.knowledge_bases import (
873881
IndexingJobRetrieveResponse,
874882
IndexingJobListResponse,
875883
IndexingJobRetrieveDataSourcesResponse,
884+
IndexingJobRetrieveSignedURLResponse,
876885
IndexingJobUpdateCancelResponse,
877886
)
878887
```
@@ -883,6 +892,7 @@ Methods:
883892
- <code title="get /v2/gen-ai/indexing_jobs/{uuid}">client.knowledge_bases.indexing_jobs.<a href="./src/gradient/resources/knowledge_bases/indexing_jobs.py">retrieve</a>(uuid) -> <a href="./src/gradient/types/knowledge_bases/indexing_job_retrieve_response.py">IndexingJobRetrieveResponse</a></code>
884893
- <code title="get /v2/gen-ai/indexing_jobs">client.knowledge_bases.indexing_jobs.<a href="./src/gradient/resources/knowledge_bases/indexing_jobs.py">list</a>(\*\*<a href="src/gradient/types/knowledge_bases/indexing_job_list_params.py">params</a>) -> <a href="./src/gradient/types/knowledge_bases/indexing_job_list_response.py">IndexingJobListResponse</a></code>
885894
- <code title="get /v2/gen-ai/indexing_jobs/{indexing_job_uuid}/data_sources">client.knowledge_bases.indexing_jobs.<a href="./src/gradient/resources/knowledge_bases/indexing_jobs.py">retrieve_data_sources</a>(indexing_job_uuid) -> <a href="./src/gradient/types/knowledge_bases/indexing_job_retrieve_data_sources_response.py">IndexingJobRetrieveDataSourcesResponse</a></code>
895+
- <code title="get /v2/gen-ai/indexing_jobs/{indexing_job_uuid}/details_signed_url">client.knowledge_bases.indexing_jobs.<a href="./src/gradient/resources/knowledge_bases/indexing_jobs.py">retrieve_signed_url</a>(indexing_job_uuid) -> <a href="./src/gradient/types/knowledge_bases/indexing_job_retrieve_signed_url_response.py">IndexingJobRetrieveSignedURLResponse</a></code>
886896
- <code title="put /v2/gen-ai/indexing_jobs/{uuid}/cancel">client.knowledge_bases.indexing_jobs.<a href="./src/gradient/resources/knowledge_bases/indexing_jobs.py">update_cancel</a>(path_uuid, \*\*<a href="src/gradient/types/knowledge_bases/indexing_job_update_cancel_params.py">params</a>) -> <a href="./src/gradient/types/knowledge_bases/indexing_job_update_cancel_response.py">IndexingJobUpdateCancelResponse</a></code>
887897

888898
# Models
@@ -982,3 +992,38 @@ Methods:
982992
- <code title="put /v2/databases/{database_cluster_uuid}/schema-registry/config">client.databases.schema_registry.config.<a href="./src/gradient/resources/databases/schema_registry/config.py">update</a>(database_cluster_uuid, \*\*<a href="src/gradient/types/databases/schema_registry/config_update_params.py">params</a>) -> <a href="./src/gradient/types/databases/schema_registry/config_update_response.py">ConfigUpdateResponse</a></code>
983993
- <code title="get /v2/databases/{database_cluster_uuid}/schema-registry/config/{subject_name}">client.databases.schema_registry.config.<a href="./src/gradient/resources/databases/schema_registry/config.py">retrieve_subject</a>(subject_name, \*, database_cluster_uuid) -> <a href="./src/gradient/types/databases/schema_registry/config_retrieve_subject_response.py">ConfigRetrieveSubjectResponse</a></code>
984994
- <code title="put /v2/databases/{database_cluster_uuid}/schema-registry/config/{subject_name}">client.databases.schema_registry.config.<a href="./src/gradient/resources/databases/schema_registry/config.py">update_subject</a>(subject_name, \*, database_cluster_uuid, \*\*<a href="src/gradient/types/databases/schema_registry/config_update_subject_params.py">params</a>) -> <a href="./src/gradient/types/databases/schema_registry/config_update_subject_response.py">ConfigUpdateSubjectResponse</a></code>
995+
996+
# Nfs
997+
998+
Types:
999+
1000+
```python
1001+
from gradient.types import (
1002+
NfCreateResponse,
1003+
NfRetrieveResponse,
1004+
NfListResponse,
1005+
NfInitiateActionResponse,
1006+
)
1007+
```
1008+
1009+
Methods:
1010+
1011+
- <code title="post /v2/nfs">client.nfs.<a href="./src/gradient/resources/nfs/nfs.py">create</a>(\*\*<a href="src/gradient/types/nf_create_params.py">params</a>) -> <a href="./src/gradient/types/nf_create_response.py">NfCreateResponse</a></code>
1012+
- <code title="get /v2/nfs/{nfs_id}">client.nfs.<a href="./src/gradient/resources/nfs/nfs.py">retrieve</a>(nfs_id, \*\*<a href="src/gradient/types/nf_retrieve_params.py">params</a>) -> <a href="./src/gradient/types/nf_retrieve_response.py">NfRetrieveResponse</a></code>
1013+
- <code title="get /v2/nfs">client.nfs.<a href="./src/gradient/resources/nfs/nfs.py">list</a>(\*\*<a href="src/gradient/types/nf_list_params.py">params</a>) -> <a href="./src/gradient/types/nf_list_response.py">NfListResponse</a></code>
1014+
- <code title="delete /v2/nfs/{nfs_id}">client.nfs.<a href="./src/gradient/resources/nfs/nfs.py">delete</a>(nfs_id, \*\*<a href="src/gradient/types/nf_delete_params.py">params</a>) -> None</code>
1015+
- <code title="post /v2/nfs/{nfs_id}/actions">client.nfs.<a href="./src/gradient/resources/nfs/nfs.py">initiate_action</a>(nfs_id, \*\*<a href="src/gradient/types/nf_initiate_action_params.py">params</a>) -> <a href="./src/gradient/types/nf_initiate_action_response.py">NfInitiateActionResponse</a></code>
1016+
1017+
## Snapshots
1018+
1019+
Types:
1020+
1021+
```python
1022+
from gradient.types.nfs import SnapshotRetrieveResponse, SnapshotListResponse
1023+
```
1024+
1025+
Methods:
1026+
1027+
- <code title="get /v2/nfs/snapshots/{nfs_snapshot_id}">client.nfs.snapshots.<a href="./src/gradient/resources/nfs/snapshots.py">retrieve</a>(nfs_snapshot_id, \*\*<a href="src/gradient/types/nfs/snapshot_retrieve_params.py">params</a>) -> <a href="./src/gradient/types/nfs/snapshot_retrieve_response.py">SnapshotRetrieveResponse</a></code>
1028+
- <code title="get /v2/nfs/snapshots">client.nfs.snapshots.<a href="./src/gradient/resources/nfs/snapshots.py">list</a>(\*\*<a href="src/gradient/types/nfs/snapshot_list_params.py">params</a>) -> <a href="./src/gradient/types/nfs/snapshot_list_response.py">SnapshotListResponse</a></code>
1029+
- <code title="delete /v2/nfs/snapshots/{nfs_snapshot_id}">client.nfs.snapshots.<a href="./src/gradient/resources/nfs/snapshots.py">delete</a>(nfs_snapshot_id, \*\*<a href="src/gradient/types/nfs/snapshot_delete_params.py">params</a>) -> None</code>

pyproject.toml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "gradient"
3-
version = "3.6.0"
3+
version = "3.8.0"
44
description = "The official Python library for the Gradient API"
55
dynamic = ["readme"]
66
license = "Apache-2.0"
@@ -13,11 +13,10 @@ dependencies = [
1313
"distro>=1.7.0, <2",
1414
"sniffio",
1515
]
16-
requires-python = ">= 3.8"
16+
requires-python = ">= 3.9"
1717
classifiers = [
1818
"Typing :: Typed",
1919
"Intended Audience :: Developers",
20-
"Programming Language :: Python :: 3.8",
2120
"Programming Language :: Python :: 3.9",
2221
"Programming Language :: Python :: 3.10",
2322
"Programming Language :: Python :: 3.11",
@@ -37,7 +36,7 @@ Homepage = "https://github.com/digitalocean/gradient-python"
3736
Repository = "https://github.com/digitalocean/gradient-python"
3837

3938
[project.optional-dependencies]
40-
aiohttp = ["aiohttp", "httpx_aiohttp>=0.1.8"]
39+
aiohttp = ["aiohttp", "httpx_aiohttp>=0.1.9"]
4140

4241
[tool.rye]
4342
managed = true
@@ -131,7 +130,7 @@ markers = [
131130
# there are a couple of flags that are still disabled by
132131
# default in strict mode as they are experimental and niche.
133132
typeCheckingMode = "strict"
134-
pythonVersion = "3.8"
133+
pythonVersion = "3.9"
135134

136135
exclude = [
137136
"_dev",

requirements-dev.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ httpx==0.28.1
5656
# via gradient
5757
# via httpx-aiohttp
5858
# via respx
59-
httpx-aiohttp==0.1.8
59+
httpx-aiohttp==0.1.9
6060
# via gradient
6161
idna==3.4
6262
# via anyio

requirements.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ httpcore==1.0.9
4343
httpx==0.28.1
4444
# via gradient
4545
# via httpx-aiohttp
46-
httpx-aiohttp==0.1.8
46+
httpx-aiohttp==0.1.9
4747
# via gradient
4848
idna==3.4
4949
# via anyio

0 commit comments

Comments
 (0)