Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
6e0ed60
chore(tests): run tests in parallel
stainless-app[bot] Dec 5, 2025
133ddee
fix(client): correctly parse binary response | stream
stainless-app[bot] Jun 13, 2025
c03af6e
chore(tests): add tests for httpx client instantiation & proxies
stainless-app[bot] Jun 17, 2025
e1f69f3
chore(internal): update conftest.py
stainless-app[bot] Jun 17, 2025
615015e
chore(ci): enable for pull requests
stainless-app[bot] Jun 17, 2025
2417444
chore(readme): update badges
stainless-app[bot] Jun 18, 2025
8a35255
fix(tests): fix: tests which call HTTP endpoints directly with the ex…
stainless-app[bot] Jun 18, 2025
28e4f0d
docs(client): fix httpx.Timeout documentation reference
stainless-app[bot] Jun 19, 2025
9eeac4b
feat(client): add support for aiohttp
stainless-app[bot] Dec 5, 2025
4735291
chore(tests): skip some failing tests on the latest python versions
stainless-app[bot] Jun 24, 2025
0961324
fix(ci): release-doctor — report correct token name
stainless-app[bot] Jun 27, 2025
8e3cd30
chore(ci): only run for pushes and fork pull requests
stainless-app[bot] Jun 28, 2025
ee5b628
fix(ci): correct conditional
stainless-app[bot] Jun 30, 2025
7801ba9
chore(ci): change upload type
stainless-app[bot] Jul 2, 2025
e2efcf5
chore(internal): codegen related update
stainless-app[bot] Jul 8, 2025
c55a48c
chore(internal): bump pinned h11 dep
stainless-app[bot] Jul 9, 2025
e580a61
chore(package): mark python 3.13 as supported
stainless-app[bot] Jul 9, 2025
f95762d
fix(parsing): correctly handle nested discriminated unions
stainless-app[bot] Jul 10, 2025
de1172d
chore(readme): fix version rendering on pypi
stainless-app[bot] Jul 11, 2025
92025c1
fix(client): don't send Content-Type header on GET requests
stainless-app[bot] Jul 12, 2025
213fcdc
feat: clean up environment call outs
stainless-app[bot] Jul 15, 2025
3901ec7
fix(parsing): ignore empty metadata
stainless-app[bot] Jul 22, 2025
e10d4fb
fix(parsing): parse extra field types
stainless-app[bot] Jul 23, 2025
8ec9f41
chore(project): add settings file for vscode
stainless-app[bot] Jul 25, 2025
f986b23
feat(client): support file upload requests
stainless-app[bot] Jul 31, 2025
d6156d2
chore(internal): fix ruff target version
stainless-app[bot] Aug 6, 2025
3918e98
chore: update @stainless-api/prism-cli to v5.15.0
stainless-app[bot] Aug 9, 2025
1aeeb0f
chore(internal): update comment in script
stainless-app[bot] Aug 9, 2025
5ddf83b
feat(api): gitpod -> ona
stainless-app[bot] Sep 3, 2025
a52c037
feat: improve future compat with pydantic v3
stainless-app[bot] Sep 3, 2025
20ff2fd
chore(internal): move mypy configurations to `pyproject.toml` file
stainless-app[bot] Sep 4, 2025
d1fea1c
codegen metadata
stainless-app[bot] Sep 4, 2025
4726cc5
chore(tests): simplify `get_platform` test
stainless-app[bot] Sep 5, 2025
670924f
release: 0.4.0
stainless-app[bot] Dec 5, 2025
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
30 changes: 26 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,17 @@ on:
- 'integrated/**'
- 'stl-preview-head/**'
- 'stl-preview-base/**'
pull_request:
branches-ignore:
- 'stl-preview-head/**'
- 'stl-preview-base/**'

jobs:
lint:
timeout-minutes: 10
name: lint
runs-on: ${{ github.repository == 'stainless-sdks/gitpod-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
steps:
- uses: actions/checkout@v4

Expand All @@ -30,24 +35,40 @@ jobs:
- name: Run lints
run: ./scripts/lint

upload:
if: github.repository == 'stainless-sdks/gitpod-python'
build:
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
timeout-minutes: 10
name: upload
name: build
permissions:
contents: read
id-token: write
runs-on: depot-ubuntu-24.04
runs-on: ${{ github.repository == 'stainless-sdks/gitpod-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
steps:
- uses: actions/checkout@v4

- name: Install Rye
run: |
curl -sSf https://rye.astral.sh/get | bash
echo "$HOME/.rye/shims" >> $GITHUB_PATH
env:
RYE_VERSION: '0.44.0'
RYE_INSTALL_OPTION: '--yes'

- name: Install dependencies
run: rye sync --all-features

- name: Run build
run: rye build

- name: Get GitHub OIDC Token
if: github.repository == 'stainless-sdks/gitpod-python'
id: github-oidc
uses: actions/github-script@v6
with:
script: core.setOutput('github_token', await core.getIDToken());

- name: Upload tarball
if: github.repository == 'stainless-sdks/gitpod-python'
env:
URL: https://pkg.stainless.com/s
AUTH: ${{ steps.github-oidc.outputs.github_token }}
Expand All @@ -58,6 +79,7 @@ jobs:
timeout-minutes: 10
name: test
runs-on: ${{ github.repository == 'stainless-sdks/gitpod-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
steps:
- uses: actions/checkout@v4

Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
.prism.log
.vscode
_dev

__pycache__
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 @@
{
".": "0.3.0"
".": "0.4.0"
}
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 119
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-ca9a49ac7fbb63f55611fd7cd48a22a3ff8b38a797125c8513e891d9b7345550.yml
openapi_spec_hash: fd6ffbdfaefcc555e61ca1c565e05214
config_hash: bb9d0a0bdadbee0985dd7c1e4f0e9e8a
config_hash: 6e0a070326b83dc6e5544baae3d14bbb
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"python.analysis.importFormat": "relative",
}
51 changes: 51 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,56 @@
# Changelog

## 0.4.0 (2025-12-05)

Full Changelog: [v0.3.0...v0.4.0](https://github.com/gitpod-io/gitpod-sdk-python/compare/v0.3.0...v0.4.0)

### Features

* **api:** gitpod -> ona ([5ddf83b](https://github.com/gitpod-io/gitpod-sdk-python/commit/5ddf83b265d51f812b239afd3d9255f7fa8d2b6b))
* clean up environment call outs ([213fcdc](https://github.com/gitpod-io/gitpod-sdk-python/commit/213fcdc66361c6d258cb899f5ddbf56a1ebdaa62))
* **client:** add support for aiohttp ([9eeac4b](https://github.com/gitpod-io/gitpod-sdk-python/commit/9eeac4b8aa2066f8bd5a3720d13560ea0c031041))
* **client:** support file upload requests ([f986b23](https://github.com/gitpod-io/gitpod-sdk-python/commit/f986b231a55b031c7e6823d7ffc23e73c33afc72))
* improve future compat with pydantic v3 ([a52c037](https://github.com/gitpod-io/gitpod-sdk-python/commit/a52c03745925595327a938a16be5715d9675c9b6))


### Bug Fixes

* **ci:** correct conditional ([ee5b628](https://github.com/gitpod-io/gitpod-sdk-python/commit/ee5b628bf87cbb5844c4f1cc69e10f5a2bb1338f))
* **ci:** release-doctor — report correct token name ([0961324](https://github.com/gitpod-io/gitpod-sdk-python/commit/096132446b6f5672966ccdfce6d4eb007ee45773))
* **client:** correctly parse binary response | stream ([133ddee](https://github.com/gitpod-io/gitpod-sdk-python/commit/133ddeed84282ff4c41b9800cfa4e97951f7d207))
* **client:** don't send Content-Type header on GET requests ([92025c1](https://github.com/gitpod-io/gitpod-sdk-python/commit/92025c1f3b8d41d4c14b1217c6bfdd866ad89520))
* **parsing:** correctly handle nested discriminated unions ([f95762d](https://github.com/gitpod-io/gitpod-sdk-python/commit/f95762d56e17f372a2610c9dbbf7228401e18889))
* **parsing:** ignore empty metadata ([3901ec7](https://github.com/gitpod-io/gitpod-sdk-python/commit/3901ec7e4d11d8b3d2848cd3c28f1a64a203a5a3))
* **parsing:** parse extra field types ([e10d4fb](https://github.com/gitpod-io/gitpod-sdk-python/commit/e10d4fbc40758f2e00d81c52e269142de7ecf7d6))
* **tests:** fix: tests which call HTTP endpoints directly with the example parameters ([8a35255](https://github.com/gitpod-io/gitpod-sdk-python/commit/8a35255e8a9a579a5a2d014810d017dbcdeea87f))


### Chores

* **ci:** change upload type ([7801ba9](https://github.com/gitpod-io/gitpod-sdk-python/commit/7801ba9fe808fd6cd3088e1269f9dc4a00f169eb))
* **ci:** enable for pull requests ([615015e](https://github.com/gitpod-io/gitpod-sdk-python/commit/615015ecefc10a68d421f7f18eb8466e4afcfa10))
* **ci:** only run for pushes and fork pull requests ([8e3cd30](https://github.com/gitpod-io/gitpod-sdk-python/commit/8e3cd300ad4d0ff35b073c0aa98e46e537a299f6))
* **internal:** bump pinned h11 dep ([c55a48c](https://github.com/gitpod-io/gitpod-sdk-python/commit/c55a48c67150a3580a6dad3ff80996c6e4ae2847))
* **internal:** codegen related update ([e2efcf5](https://github.com/gitpod-io/gitpod-sdk-python/commit/e2efcf5c5289ada60c32c36d59987d933e40a6c6))
* **internal:** fix ruff target version ([d6156d2](https://github.com/gitpod-io/gitpod-sdk-python/commit/d6156d2ab264178dda14f8eed4496c3ff420fa94))
* **internal:** move mypy configurations to `pyproject.toml` file ([20ff2fd](https://github.com/gitpod-io/gitpod-sdk-python/commit/20ff2fdec396b41c230fd6f7ab6ffee8054e7b46))
* **internal:** update comment in script ([1aeeb0f](https://github.com/gitpod-io/gitpod-sdk-python/commit/1aeeb0fe71f4f10a76875770061da7e87c0bd000))
* **internal:** update conftest.py ([e1f69f3](https://github.com/gitpod-io/gitpod-sdk-python/commit/e1f69f382a1d5f99e71aa2e2ae559644f71b4352))
* **package:** mark python 3.13 as supported ([e580a61](https://github.com/gitpod-io/gitpod-sdk-python/commit/e580a61a67bba85d36aa04e99090a482de6a85a2))
* **project:** add settings file for vscode ([8ec9f41](https://github.com/gitpod-io/gitpod-sdk-python/commit/8ec9f413960970c9c46272d775e85b7cd2159a4c))
* **readme:** fix version rendering on pypi ([de1172d](https://github.com/gitpod-io/gitpod-sdk-python/commit/de1172d8dd3411f9ff5bf3e87c42c2c57ad1e602))
* **readme:** update badges ([2417444](https://github.com/gitpod-io/gitpod-sdk-python/commit/24174444a9b9ce67f5ef4590633f0380f2f7efee))
* **tests:** add tests for httpx client instantiation & proxies ([c03af6e](https://github.com/gitpod-io/gitpod-sdk-python/commit/c03af6ee2abc77132eda9ffad9e31a49e2dd59fb))
* **tests:** run tests in parallel ([6e0ed60](https://github.com/gitpod-io/gitpod-sdk-python/commit/6e0ed6062d5db6d5565b953c9991c0e8598775e1))
* **tests:** simplify `get_platform` test ([4726cc5](https://github.com/gitpod-io/gitpod-sdk-python/commit/4726cc56e22ec7883d51d433fda688679fe9d957))
* **tests:** skip some failing tests on the latest python versions ([4735291](https://github.com/gitpod-io/gitpod-sdk-python/commit/473529172a90e9ca731e0f9fc3ab881e4957d946))
* update @stainless-api/prism-cli to v5.15.0 ([3918e98](https://github.com/gitpod-io/gitpod-sdk-python/commit/3918e98029a9a2e1381f1488c75c14d8e3e16bbd))


### Documentation

* **client:** fix httpx.Timeout documentation reference ([28e4f0d](https://github.com/gitpod-io/gitpod-sdk-python/commit/28e4f0da8237a7823e79b9beea870e9689261d57))

## 0.3.0 (2025-06-06)

Full Changelog: [v0.2.1...v0.3.0](https://github.com/gitpod-io/gitpod-sdk-python/compare/v0.2.1...v0.3.0)
Expand Down
38 changes: 35 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Gitpod Python API library

[![PyPI version](https://img.shields.io/pypi/v/gitpod-sdk.svg)](https://pypi.org/project/gitpod-sdk/)
<!-- prettier-ignore -->
[![PyPI version](https://img.shields.io/pypi/v/gitpod-sdk.svg?label=pypi%20(stable))](https://pypi.org/project/gitpod-sdk/)

The Gitpod Python library provides convenient access to the Gitpod REST API from any Python 3.8+
application. The library includes type definitions for all request params and response fields,
Expand All @@ -10,7 +11,7 @@ It is generated with [Stainless](https://www.stainless.com/).

## Documentation

The REST API documentation can be found on [docs.gitpod.io](https://docs.gitpod.io). The full API of this library can be found in [api.md](api.md).
The REST API documentation can be found on [docs.ona.com](https://docs.ona.com). The full API of this library can be found in [api.md](api.md).

## Installation

Expand Down Expand Up @@ -64,6 +65,37 @@ asyncio.run(main())

Functionality between the synchronous and asynchronous clients is otherwise identical.

### With aiohttp

By default, the async client uses `httpx` for HTTP requests. However, for improved concurrency performance you may also use `aiohttp` as the HTTP backend.

You can enable this by installing `aiohttp`:

```sh
# install from PyPI
pip install gitpod-sdk[aiohttp]
```

Then you can enable it by instantiating the client with `http_client=DefaultAioHttpClient()`:

```python
import asyncio
from gitpod import DefaultAioHttpClient
from gitpod import AsyncGitpod


async def main() -> None:
async with AsyncGitpod(
bearer_token="My Bearer Token",
http_client=DefaultAioHttpClient(),
) as client:
response = await client.identity.get_authenticated_identity()
print(response.organization_id)


asyncio.run(main())
```

## Using types

Nested request parameters are [TypedDicts](https://docs.python.org/3/library/typing.html#typing.TypedDict). Responses are [Pydantic models](https://docs.pydantic.dev) which also provide helper methods for things like:
Expand Down Expand Up @@ -216,7 +248,7 @@ client.with_options(max_retries=5).identity.get_authenticated_identity()
### Timeouts

By default requests time out after 1 minute. You can configure this with a `timeout` option,
which accepts a float or an [`httpx.Timeout`](https://www.python-httpx.org/advanced/#fine-tuning-the-configuration) object:
which accepts a float or an [`httpx.Timeout`](https://www.python-httpx.org/advanced/timeouts/#fine-tuning-the-configuration) object:

```python
from gitpod import Gitpod
Expand Down
2 changes: 1 addition & 1 deletion SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ or products provided by Gitpod, please follow the respective company's security

### Gitpod Terms and Policies

Please contact dev-feedback@gitpod.com for any questions or concerns regarding the security of our services.
Please contact dev-feedback@ona.com for any questions or concerns regarding the security of our services.

---

Expand Down
2 changes: 1 addition & 1 deletion bin/check-release-environment
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
errors=()

if [ -z "${PYPI_TOKEN}" ]; then
errors+=("The GITPOD_PYPI_TOKEN secret has not been set. Please set it in either this repository's secrets or your organization secrets.")
errors+=("The PYPI_TOKEN secret has not been set. Please set it in either this repository's secrets or your organization secrets.")
fi

lenErrors=${#errors[@]}
Expand Down
50 changes: 0 additions & 50 deletions mypy.ini

This file was deleted.

Loading