Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "3.0.2"
".": "3.1.0"
}
8 changes: 4 additions & 4 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 173
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/digitalocean%2Fgradient-621c3ebf5011c5ca508f78fccbea17de4ca6b35bfe99578c1ae2265021578d6f.yml
openapi_spec_hash: e29d14e3e4679fcf22b3e760e49931b1
config_hash: 3d425c415b7f7ab581418b43eb521cb3
configured_endpoints: 175
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/digitalocean%2Fgradient-40c154e2fdc4fef9ca1cf8329c29b7102bf324acfc9589571d6f3452d1ca579c.yml
openapi_spec_hash: 83a3d092965fde776b29b61f785459f9
config_hash: dd3a0f16fb9e072bb63c570b14beccd2
24 changes: 24 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,29 @@
# Changelog

## 3.1.0 (2025-10-03)

Full Changelog: [v3.0.2...v3.1.0](https://github.com/digitalocean/gradient-python/compare/v3.0.2...v3.1.0)

### Features

* **api:** update via SDK Studio ([20f2512](https://github.com/digitalocean/gradient-python/commit/20f251223fbe35fbe170b07be41fa6fd2656eed7))
* **api:** update via SDK Studio ([09bf61b](https://github.com/digitalocean/gradient-python/commit/09bf61b5c24b1299a84ea6e8d4df3b88118d9fc3))
* **api:** update via SDK Studio ([76d29b6](https://github.com/digitalocean/gradient-python/commit/76d29b61ce039f3f270715135ab4d0f444a52b3c))
* **api:** update via SDK Studio ([fa68fb4](https://github.com/digitalocean/gradient-python/commit/fa68fb43e3e175b3dacd62d459b5d8c38b07e367))
* **api:** update via SDK Studio ([e23ac14](https://github.com/digitalocean/gradient-python/commit/e23ac14538e17e8d33c33335285389cf13eefe04))
* **api:** update via SDK Studio ([a5f6aa6](https://github.com/digitalocean/gradient-python/commit/a5f6aa656021a9aaa6a2e82dfa251f87f0096de0))
* **api:** update via SDK Studio ([b900d76](https://github.com/digitalocean/gradient-python/commit/b900d769ba4a290523f17d2d69de850366c961b6))


### Chores

* **client:** support model_access_key in image generations ([4b81c5c](https://github.com/digitalocean/gradient-python/commit/4b81c5cf4998707ca2b4eff25845f687e2002602))
* **client:** support model_access_key in image generations for real ([c202e81](https://github.com/digitalocean/gradient-python/commit/c202e81d81732217a839a0c7c5e56178252362a1))
* fix bash quoting ([d92383d](https://github.com/digitalocean/gradient-python/commit/d92383da134a32cb0ae6f5a1c3044ec4947deacc))
* quote bash variables ([6673263](https://github.com/digitalocean/gradient-python/commit/6673263dbdee2ae77eabd2f6d88cf61921f9e63c))
* remove preview warning ([e4cf6a8](https://github.com/digitalocean/gradient-python/commit/e4cf6a8b5b37acf483be7301aa0a661a5db43a05))
* update actions versions ([7056460](https://github.com/digitalocean/gradient-python/commit/7056460cef8093329da4ed24f2e7bd286213e90d))

## 3.0.2 (2025-09-24)

Full Changelog: [v3.0.1...v3.0.2](https://github.com/digitalocean/gradient-python/compare/v3.0.1...v3.0.2)
Expand Down
20 changes: 20 additions & 0 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ from gradient.types import (
GarbageCollection,
GPUInfo,
Image,
ImageGenCompletedEvent,
ImageGenPartialImageEvent,
ImageGenStreamEvent,
Kernel,
MetaProperties,
NetworkV4,
Expand Down Expand Up @@ -383,6 +386,20 @@ Methods:

- <code title="post /chat/completions">client.chat.completions.<a href="./src/gradient/resources/chat/completions.py">create</a>(\*\*<a href="src/gradient/types/chat/completion_create_params.py">params</a>) -> <a href="./src/gradient/types/chat/completion_create_response.py">CompletionCreateResponse</a></code>

# Images

## Generations

Types:

```python
from gradient.types.images import GenerationCreateResponse
```

Methods:

- <code title="post /images/generations">client.images.generations.<a href="./src/gradient/resources/images/generations.py">create</a>(\*\*<a href="src/gradient/types/images/generation_create_params.py">params</a>) -> <a href="./src/gradient/types/images/generation_create_response.py">GenerationCreateResponse</a></code>

# GPUDroplets

Types:
Expand Down Expand Up @@ -757,6 +774,7 @@ Types:

```python
from gradient.types.gpu_droplets.account import (
SSHKeys,
KeyCreateResponse,
KeyRetrieveResponse,
KeyUpdateResponse,
Expand Down Expand Up @@ -834,6 +852,7 @@ from gradient.types.knowledge_bases import (
DataSourceCreateResponse,
DataSourceListResponse,
DataSourceDeleteResponse,
DataSourceCreatePresignedURLsResponse,
)
```

Expand All @@ -842,6 +861,7 @@ Methods:
- <code title="post /v2/gen-ai/knowledge_bases/{knowledge_base_uuid}/data_sources">client.knowledge_bases.data_sources.<a href="./src/gradient/resources/knowledge_bases/data_sources.py">create</a>(path_knowledge_base_uuid, \*\*<a href="src/gradient/types/knowledge_bases/data_source_create_params.py">params</a>) -> <a href="./src/gradient/types/knowledge_bases/data_source_create_response.py">DataSourceCreateResponse</a></code>
- <code title="get /v2/gen-ai/knowledge_bases/{knowledge_base_uuid}/data_sources">client.knowledge_bases.data_sources.<a href="./src/gradient/resources/knowledge_bases/data_sources.py">list</a>(knowledge_base_uuid, \*\*<a href="src/gradient/types/knowledge_bases/data_source_list_params.py">params</a>) -> <a href="./src/gradient/types/knowledge_bases/data_source_list_response.py">DataSourceListResponse</a></code>
- <code title="delete /v2/gen-ai/knowledge_bases/{knowledge_base_uuid}/data_sources/{data_source_uuid}">client.knowledge_bases.data_sources.<a href="./src/gradient/resources/knowledge_bases/data_sources.py">delete</a>(data_source_uuid, \*, knowledge_base_uuid) -> <a href="./src/gradient/types/knowledge_bases/data_source_delete_response.py">DataSourceDeleteResponse</a></code>
- <code title="post /v2/gen-ai/knowledge_bases/data_sources/file_upload_presigned_urls">client.knowledge_bases.data_sources.<a href="./src/gradient/resources/knowledge_bases/data_sources.py">create_presigned_urls</a>(\*\*<a href="src/gradient/types/knowledge_bases/data_source_create_presigned_urls_params.py">params</a>) -> <a href="./src/gradient/types/knowledge_bases/data_source_create_presigned_urls_response.py">DataSourceCreatePresignedURLsResponse</a></code>

## IndexingJobs

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "gradient"
version = "3.0.2"
version = "3.1.0"
description = "The official Python library for the Gradient API"
dynamic = ["readme"]
license = "Apache-2.0"
Expand Down
38 changes: 38 additions & 0 deletions src/gradient/_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
from .resources import (
chat,
agents,
images,
models,
regions,
databases,
Expand All @@ -49,6 +50,7 @@
AsyncGPUDropletsResource,
)
from .resources.agents.agents import AgentsResource, AsyncAgentsResource
from .resources.images.images import ImagesResource, AsyncImagesResource
from .resources.models.models import ModelsResource, AsyncModelsResource
from .resources.databases.databases import DatabasesResource, AsyncDatabasesResource
from .resources.inference.inference import InferenceResource, AsyncInferenceResource
Expand Down Expand Up @@ -182,6 +184,12 @@ def chat(self) -> ChatResource:

return ChatResource(self)

@cached_property
def images(self) -> ImagesResource:
from .resources.images import ImagesResource

return ImagesResource(self)

@cached_property
def gpu_droplets(self) -> GPUDropletsResource:
from .resources.gpu_droplets import GPUDropletsResource
Expand Down Expand Up @@ -471,6 +479,12 @@ def chat(self) -> AsyncChatResource:

return AsyncChatResource(self)

@cached_property
def images(self) -> AsyncImagesResource:
from .resources.images import AsyncImagesResource

return AsyncImagesResource(self)

@cached_property
def gpu_droplets(self) -> AsyncGPUDropletsResource:
from .resources.gpu_droplets import AsyncGPUDropletsResource
Expand Down Expand Up @@ -665,6 +679,12 @@ def chat(self) -> chat.ChatResourceWithRawResponse:

return ChatResourceWithRawResponse(self._client.chat)

@cached_property
def images(self) -> images.ImagesResourceWithRawResponse:
from .resources.images import ImagesResourceWithRawResponse

return ImagesResourceWithRawResponse(self._client.images)

@cached_property
def gpu_droplets(self) -> gpu_droplets.GPUDropletsResourceWithRawResponse:
from .resources.gpu_droplets import GPUDropletsResourceWithRawResponse
Expand Down Expand Up @@ -720,6 +740,12 @@ def chat(self) -> chat.AsyncChatResourceWithRawResponse:

return AsyncChatResourceWithRawResponse(self._client.chat)

@cached_property
def images(self) -> images.AsyncImagesResourceWithRawResponse:
from .resources.images import AsyncImagesResourceWithRawResponse

return AsyncImagesResourceWithRawResponse(self._client.images)

@cached_property
def gpu_droplets(self) -> gpu_droplets.AsyncGPUDropletsResourceWithRawResponse:
from .resources.gpu_droplets import AsyncGPUDropletsResourceWithRawResponse
Expand Down Expand Up @@ -779,6 +805,12 @@ def chat(self) -> chat.ChatResourceWithStreamingResponse:

return ChatResourceWithStreamingResponse(self._client.chat)

@cached_property
def images(self) -> images.ImagesResourceWithStreamingResponse:
from .resources.images import ImagesResourceWithStreamingResponse

return ImagesResourceWithStreamingResponse(self._client.images)

@cached_property
def gpu_droplets(self) -> gpu_droplets.GPUDropletsResourceWithStreamingResponse:
from .resources.gpu_droplets import GPUDropletsResourceWithStreamingResponse
Expand Down Expand Up @@ -838,6 +870,12 @@ def chat(self) -> chat.AsyncChatResourceWithStreamingResponse:

return AsyncChatResourceWithStreamingResponse(self._client.chat)

@cached_property
def images(self) -> images.AsyncImagesResourceWithStreamingResponse:
from .resources.images import AsyncImagesResourceWithStreamingResponse

return AsyncImagesResourceWithStreamingResponse(self._client.images)

@cached_property
def gpu_droplets(
self,
Expand Down
2 changes: 1 addition & 1 deletion src/gradient/_version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

__title__ = "gradient"
__version__ = "3.0.2" # x-release-please-version
__version__ = "3.1.0" # x-release-please-version
14 changes: 14 additions & 0 deletions src/gradient/resources/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,14 @@
AgentsResourceWithStreamingResponse,
AsyncAgentsResourceWithStreamingResponse,
)
from .images import (
ImagesResource,
AsyncImagesResource,
ImagesResourceWithRawResponse,
AsyncImagesResourceWithRawResponse,
ImagesResourceWithStreamingResponse,
AsyncImagesResourceWithStreamingResponse,
)
from .models import (
ModelsResource,
AsyncModelsResource,
Expand Down Expand Up @@ -78,6 +86,12 @@
"AsyncChatResourceWithRawResponse",
"ChatResourceWithStreamingResponse",
"AsyncChatResourceWithStreamingResponse",
"ImagesResource",
"AsyncImagesResource",
"ImagesResourceWithRawResponse",
"AsyncImagesResourceWithRawResponse",
"ImagesResourceWithStreamingResponse",
"AsyncImagesResourceWithStreamingResponse",
"GPUDropletsResource",
"AsyncGPUDropletsResource",
"GPUDropletsResourceWithRawResponse",
Expand Down
33 changes: 33 additions & 0 deletions src/gradient/resources/images/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from .images import (
ImagesResource,
AsyncImagesResource,
ImagesResourceWithRawResponse,
AsyncImagesResourceWithRawResponse,
ImagesResourceWithStreamingResponse,
AsyncImagesResourceWithStreamingResponse,
)
from .generations import (
GenerationsResource,
AsyncGenerationsResource,
GenerationsResourceWithRawResponse,
AsyncGenerationsResourceWithRawResponse,
GenerationsResourceWithStreamingResponse,
AsyncGenerationsResourceWithStreamingResponse,
)

__all__ = [
"GenerationsResource",
"AsyncGenerationsResource",
"GenerationsResourceWithRawResponse",
"AsyncGenerationsResourceWithRawResponse",
"GenerationsResourceWithStreamingResponse",
"AsyncGenerationsResourceWithStreamingResponse",
"ImagesResource",
"AsyncImagesResource",
"ImagesResourceWithRawResponse",
"AsyncImagesResourceWithRawResponse",
"ImagesResourceWithStreamingResponse",
"AsyncImagesResourceWithStreamingResponse",
]
Loading