Skip to content

Commit bcb91a1

Browse files
release: 3.7.0 (#65)
* chore: bump `httpx-aiohttp` version to 0.1.9 * fix(client): close streams without requiring full consumption * feat(api): add inference errors * chore(internal/tests): avoid race condition with implicit client cleanup * feat(api): include indexing jobs * chore(internal): grammar fix (it's -> its) * chore(package): drop Python 3.8 support * fix: compat with Python 3.14 * fix(compat): update signatures of `model_dump` and `model_dump_json` for Pydantic v1 * chore: merge issues in test_client.py (#87) * release: 3.7.0 --------- Co-authored-by: stainless-app[bot] <142633134+stainless-app[bot]@users.noreply.github.com> Co-authored-by: Ben Batha <[email protected]>
1 parent 76392b5 commit bcb91a1

File tree

69 files changed

+4874
-430
lines changed

Some content is hidden

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

69 files changed

+4874
-430
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.7.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: b712366a70c9d33e22d40eb601ca972f

CHANGELOG.md

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

3+
## 3.7.0 (2025-11-19)
4+
5+
Full Changelog: [v3.6.0...v3.7.0](https://github.com/digitalocean/gradient-python/compare/v3.6.0...v3.7.0)
6+
7+
### Features
8+
9+
* 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))
10+
* 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))
11+
* **api:** add inference errors ([d61d495](https://github.com/digitalocean/gradient-python/commit/d61d4955f596d9ac1bebc9387a6573989e823022))
12+
* **api:** include indexing jobs ([d249d06](https://github.com/digitalocean/gradient-python/commit/d249d0606e26d585eb2b7859948a796ea7860f53))
13+
14+
15+
### Bug Fixes
16+
17+
* **client:** close streams without requiring full consumption ([33fe04b](https://github.com/digitalocean/gradient-python/commit/33fe04b2e4ab71094ee13e7b83d4c04867e7d485))
18+
* compat with Python 3.14 ([add7b21](https://github.com/digitalocean/gradient-python/commit/add7b21b9fbb8987641d5520da638647fe27b159))
19+
* **compat:** update signatures of `model_dump` and `model_dump_json` for Pydantic v1 ([c945870](https://github.com/digitalocean/gradient-python/commit/c945870a31840d553cb1e3a75314f1c884a56060))
20+
21+
22+
### Chores
23+
24+
* bump `httpx-aiohttp` version to 0.1.9 ([db39cc6](https://github.com/digitalocean/gradient-python/commit/db39cc63fb126ac81edfe2cb991493d10a2d0936))
25+
* **internal/tests:** avoid race condition with implicit client cleanup ([e0202bb](https://github.com/digitalocean/gradient-python/commit/e0202bb915613872095f7f223a49c4480e50be98))
26+
* **internal:** grammar fix (it's -&gt; its) ([c6ffb3b](https://github.com/digitalocean/gradient-python/commit/c6ffb3becbcb99e36992934fac20d67a6a3b967c))
27+
* merge issues in test_client.py ([#87](https://github.com/digitalocean/gradient-python/issues/87)) ([62fc025](https://github.com/digitalocean/gradient-python/commit/62fc02512e941c6af18b11c19df8828cca31159d))
28+
* **package:** drop Python 3.8 support ([825b1e4](https://github.com/digitalocean/gradient-python/commit/825b1e4f8b257fc103c0d45743133bbc81ca3e10))
29+
330
## 3.6.0 (2025-10-16)
431

532
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 & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,24 @@ Methods:
243243

244244
- <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>
245245

246+
### ScheduledIndexing
247+
248+
Types:
249+
250+
```python
251+
from gradient.types.agents.evaluation_metrics import (
252+
ScheduledIndexingCreateResponse,
253+
ScheduledIndexingRetrieveResponse,
254+
ScheduledIndexingDeleteResponse,
255+
)
256+
```
257+
258+
Methods:
259+
260+
- <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>
261+
- <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>
262+
- <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>
263+
246264
## EvaluationRuns
247265

248266
Types:
@@ -825,6 +843,7 @@ from gradient.types import (
825843
KnowledgeBaseUpdateResponse,
826844
KnowledgeBaseListResponse,
827845
KnowledgeBaseDeleteResponse,
846+
KnowledgeBaseListIndexingJobsResponse,
828847
)
829848
```
830849

@@ -835,6 +854,7 @@ Methods:
835854
- <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>
836855
- <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>
837856
- <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>
857+
- <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>
838858

839859
## DataSources
840860

@@ -873,6 +893,7 @@ from gradient.types.knowledge_bases import (
873893
IndexingJobRetrieveResponse,
874894
IndexingJobListResponse,
875895
IndexingJobRetrieveDataSourcesResponse,
896+
IndexingJobRetrieveSignedURLResponse,
876897
IndexingJobUpdateCancelResponse,
877898
)
878899
```
@@ -883,6 +904,7 @@ Methods:
883904
- <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>
884905
- <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>
885906
- <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>
907+
- <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>
886908
- <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>
887909

888910
# Models
@@ -982,3 +1004,38 @@ Methods:
9821004
- <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>
9831005
- <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>
9841006
- <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>
1007+
1008+
# Nfs
1009+
1010+
Types:
1011+
1012+
```python
1013+
from gradient.types import (
1014+
NfCreateResponse,
1015+
NfRetrieveResponse,
1016+
NfListResponse,
1017+
NfInitiateActionResponse,
1018+
)
1019+
```
1020+
1021+
Methods:
1022+
1023+
- <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>
1024+
- <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>
1025+
- <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>
1026+
- <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>
1027+
- <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>
1028+
1029+
## Snapshots
1030+
1031+
Types:
1032+
1033+
```python
1034+
from gradient.types.nfs import SnapshotRetrieveResponse, SnapshotListResponse
1035+
```
1036+
1037+
Methods:
1038+
1039+
- <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>
1040+
- <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>
1041+
- <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.7.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)