Skip to content
Open
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
8 changes: 6 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,18 @@ jobs:
run: rye build

- name: Get GitHub OIDC Token
if: github.repository == 'stainless-sdks/gradient-python'
if: |-
github.repository == 'stainless-sdks/gradient-python' &&
!startsWith(github.ref, 'refs/heads/stl/')
id: github-oidc
uses: actions/github-script@v8
with:
script: core.setOutput('github_token', await core.getIDToken());

- name: Upload tarball
if: github.repository == 'stainless-sdks/gradient-python'
if: |-
github.repository == 'stainless-sdks/gradient-python' &&
!startsWith(github.ref, 'refs/heads/stl/')
env:
URL: https://pkg.stainless.com/s
AUTH: ${{ steps.github-oidc.outputs.github_token }}
Expand Down
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.11.0"
".": "3.12.0"
}
6 changes: 3 additions & 3 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 193
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/digitalocean%2Fgradient-2344b44246a44d39ad5b74d3077bd2958745aad67feb15970756532fa0b3f9d6.yml
openapi_spec_hash: a1913979235ce152a8dc380fabe5362e
config_hash: 6c9a04f3cc5dd88e1e4f0ae42d98ba9a
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/digitalocean%2Fgradient-24bdeb83fbe576e4dd92498321be977e820fd755babee77eb8ff419a6229b22f.yml
openapi_spec_hash: f1faf4e4e0fc37e518fe55ff7c01086d
config_hash: 3f968a57adb20643373c134efc9af01a
24 changes: 24 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,29 @@
# Changelog

## 3.12.0 (2026-03-13)

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

### Features

* **api:** manual updates ([e139299](https://github.com/digitalocean/gradient-python/commit/e13929984bbfa991d51a56946a40380a909f1d75))
* **api:** responses ([3277876](https://github.com/digitalocean/gradient-python/commit/32778769c86140d283a9f456568f68803208ae62))
* **api:** update urls for endpoints ([2d4da01](https://github.com/digitalocean/gradient-python/commit/2d4da01e55e7f7a96aea98232ef05b28ebbcbada))
* **client:** add support for binary request streaming ([f9706f4](https://github.com/digitalocean/gradient-python/commit/f9706f4b88e6278a5be1057c30a8939fed415767))


### Chores

* format all `api.md` files ([e103720](https://github.com/digitalocean/gradient-python/commit/e103720daa6eaae0454cbb857d97b1b2e43b405f))
* **internal:** add request options to SSE classes ([17b88d9](https://github.com/digitalocean/gradient-python/commit/17b88d90dafe6a1d9db3f4ea15f17c7cdf838f81))
* **internal:** codegen related update ([6f506cb](https://github.com/digitalocean/gradient-python/commit/6f506cb1dae5679b5ed992822658f333e382340e))
* **internal:** codegen related update ([56acb2e](https://github.com/digitalocean/gradient-python/commit/56acb2e47da30e09ab6cbf42c285bf6480a376fe))
* **internal:** codegen related update ([865fb4c](https://github.com/digitalocean/gradient-python/commit/865fb4cadfe0ce791ecc4ad38f50ce25b00477ee))
* **internal:** make `test_proxy_environment_variables` more resilient ([09cfd99](https://github.com/digitalocean/gradient-python/commit/09cfd991d0442077c4f66b47f4d9da34f608692d))
* **internal:** make `test_proxy_environment_variables` more resilient to env ([f3aa13b](https://github.com/digitalocean/gradient-python/commit/f3aa13b09ca2c1f565cc3277530bfa1775d02dd0))
* **internal:** remove mock server code ([f774a64](https://github.com/digitalocean/gradient-python/commit/f774a64d51891a10e3d30ddaafe556afdf4502e0))
* update mock server docs ([fa4da88](https://github.com/digitalocean/gradient-python/commit/fa4da887118bdf9462d74328a81a61dc4c4c30e9))

## 3.11.0 (2026-02-17)

Full Changelog: [v3.10.1...v3.11.0](https://github.com/digitalocean/gradient-python/compare/v3.10.1...v3.11.0)
Expand Down
7 changes: 0 additions & 7 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,13 +85,6 @@ $ pip install ./path-to-wheel-file.whl

## Running tests

Most tests require you to [set up a mock server](https://github.com/stoplightio/prism) against the OpenAPI spec to run the tests.

```sh
# you will need npm installed
$ npx prism mock path/to/your/openapi.yml
```

```sh
$ ./scripts/test
```
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.11.0"
version = "3.12.0"
description = "The official Python library for the Gradient API"
dynamic = ["readme"]
license = "Apache-2.0"
Expand Down
41 changes: 0 additions & 41 deletions scripts/mock

This file was deleted.

46 changes: 0 additions & 46 deletions scripts/test
Original file line number Diff line number Diff line change
Expand Up @@ -4,53 +4,7 @@ set -e

cd "$(dirname "$0")/.."

RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[0;33m'
NC='\033[0m' # No Color

function prism_is_running() {
curl --silent "http://localhost:4010" >/dev/null 2>&1
}

kill_server_on_port() {
pids=$(lsof -t -i tcp:"$1" || echo "")
if [ "$pids" != "" ]; then
kill "$pids"
echo "Stopped $pids."
fi
}

function is_overriding_api_base_url() {
[ -n "$TEST_API_BASE_URL" ]
}

if ! is_overriding_api_base_url && ! prism_is_running ; then
# When we exit this script, make sure to kill the background mock server process
trap 'kill_server_on_port 4010' EXIT

# Start the dev server
./scripts/mock --daemon
fi

if is_overriding_api_base_url ; then
echo -e "${GREEN}✔ Running tests against ${TEST_API_BASE_URL}${NC}"
echo
elif ! prism_is_running ; then
echo -e "${RED}ERROR:${NC} The test suite will not run without a mock Prism server"
echo -e "running against your OpenAPI spec."
echo
echo -e "To run the server, pass in the path or url of your OpenAPI"
echo -e "spec to the prism command:"
echo
echo -e " \$ ${YELLOW}npm exec --package=@stainless-api/prism-cli@5.15.0 -- prism mock path/to/your.openapi.yml${NC}"
echo

exit 1
else
echo -e "${GREEN}✔ Mock prism server is running with your OpenAPI spec${NC}"
echo
fi

export DEFER_PYDANTIC_BUILD=false

Expand Down
Loading