Skip to content

Commit f40ef8c

Browse files
authored
Merge pull request #32 from digitalocean/release-please--branches--main--changes--next
release: 3.0.0-beta.3
2 parents 7730dd6 + 377fb53 commit f40ef8c

File tree

11 files changed

+760
-406
lines changed

11 files changed

+760
-406
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.0.0-beta.2"
2+
".": "3.0.0-beta.3"
33
}

.stats.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 170
22
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/digitalocean%2Fgradient-9aca3802735e1375125412aa28ac36bf2175144b8218610a73d2e7f775694dff.yml
33
openapi_spec_hash: e29d14e3e4679fcf22b3e760e49931b1
4-
config_hash: de89a9c8fde0120577d2aca8be4ae027
4+
config_hash: 99e3cd5dde0beb796f4547410869f726

CHANGELOG.md

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

3+
## 3.0.0-beta.3 (2025-08-08)
4+
5+
Full Changelog: [v3.0.0-beta.2...v3.0.0-beta.3](https://github.com/digitalocean/gradient-python/compare/v3.0.0-beta.2...v3.0.0-beta.3)
6+
7+
### Features
8+
9+
* **api:** make kwargs match the env vars ([b74952e](https://github.com/digitalocean/gradient-python/commit/b74952e665a92a50937f475ef68331d85d96e018))
10+
* **api:** rename environment variables ([ed70ab7](https://github.com/digitalocean/gradient-python/commit/ed70ab72ce3faecd7fb5070f429275518b7aa6f2))
11+
12+
13+
### Bug Fixes
14+
15+
* actually read env vars ([68daceb](https://github.com/digitalocean/gradient-python/commit/68daceb4cf89b76fbf04e5111cea7541a989afed))
16+
* **config:** align environment variables with other DO tools and console ([#40](https://github.com/digitalocean/gradient-python/issues/40)) ([#41](https://github.com/digitalocean/gradient-python/issues/41)) ([6853d05](https://github.com/digitalocean/gradient-python/commit/6853d0542055a29a70685cab67414e5612890c7d))
17+
* use of cached variable in internals ([4bd6ace](https://github.com/digitalocean/gradient-python/commit/4bd6ace92d2dbfe1364c5f5aa8e0bf5899e8fc16))
18+
19+
20+
### Chores
21+
22+
* **internal:** fix ruff target version ([b370349](https://github.com/digitalocean/gradient-python/commit/b370349a68d24b00854e3f54df50c86f2c29651b))
23+
324
## 3.0.0-beta.2 (2025-08-04)
425

526
Full Changelog: [v3.0.0-beta.1...v3.0.0-beta.2](https://github.com/digitalocean/gradient-python/compare/v3.0.0-beta.1...v3.0.0-beta.2)

README.md

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,15 +42,17 @@ import os
4242
from gradient import Gradient
4343

4444
client = Gradient(
45-
api_key=os.environ.get("GRADIENT_API_KEY"), # This is the default and can be omitted
45+
access_token=os.environ.get(
46+
"DIGITALOCEAN_ACCESS_TOKEN"
47+
), # This is the default and can be omitted
4648
)
4749
inference_client = Gradient(
4850
inference_key=os.environ.get(
49-
"GRADIENT_INFERENCE_KEY"
51+
"GRADIENT_MODEL_ACCESS_KEY"
5052
), # This is the default and can be omitted
5153
)
5254
agent_client = Gradient(
53-
agent_key=os.environ.get("GRADIENT_AGENT_KEY"), # This is the default and can be omitted
55+
agent_key=os.environ.get("GRADIENT_AGENT_ACCESS_KEY"), # This is the default and can be omitted
5456
agent_endpoint="https://my-agent.agents.do-ai.run",
5557
)
5658

@@ -90,9 +92,9 @@ print("--- Agent Inference")
9092
print(agent_response.choices[0].message.content)
9193
```
9294

93-
While you can provide an `api_key`, `inference_key` keyword argument,
95+
While you can provide an `access_token`, `model_access_key` keyword argument,
9496
we recommend using [python-dotenv](https://pypi.org/project/python-dotenv/)
95-
to add `GRADIENT_API_KEY="My API Key"`, `GRADIENT_INFERENCE_KEY="My INFERENCE Key"` to your `.env` file
97+
to add `DIGITALOCEAN_ACCESS_TOKEN="My API Key"`, `GRADIENT_MODEL_ACCESS_KEY="My INFERENCE Key"` to your `.env` file
9698
so that your keys are not stored in source control.
9799

98100
## Async usage
@@ -105,7 +107,9 @@ import asyncio
105107
from gradient import AsyncGradient
106108

107109
client = AsyncGradient(
108-
api_key=os.environ.get("GRADIENT_API_KEY"), # This is the default and can be omitted
110+
access_token=os.environ.get(
111+
"DIGITALOCEAN_ACCESS_TOKEN"
112+
), # This is the default and can be omitted
109113
)
110114

111115

@@ -148,7 +152,7 @@ from gradient import AsyncGradient
148152

149153
async def main() -> None:
150154
async with AsyncGradient(
151-
api_key="My API Key",
155+
access_token="My Access Token",
152156
http_client=DefaultAioHttpClient(),
153157
) as client:
154158
completion = await client.chat.completions.create(

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "gradient"
3-
version = "3.0.0-beta.2"
3+
version = "3.0.0-beta.3"
44
description = "The official Python library for the Gradient API"
55
dynamic = ["readme"]
66
license = "Apache-2.0"
@@ -142,7 +142,7 @@ reportPrivateUsage = false
142142
[tool.ruff]
143143
line-length = 120
144144
output-format = "grouped"
145-
target-version = "py37"
145+
target-version = "py38"
146146

147147
[tool.ruff.format]
148148
docstring-code-format = true

0 commit comments

Comments
 (0)