Skip to content

Commit

Permalink
release: 0.1.0-alpha.2 (#17)
Browse files Browse the repository at this point in the history
* chore: update SDK settings (#16)

* feat(api): manual updates (#18)

* feat(api): manual updates (#19)

* feat(api): manual updates (#20)

* release: 0.1.0-alpha.2

---------

Co-authored-by: stainless-app[bot] <142633134+stainless-app[bot]@users.noreply.github.com>
  • Loading branch information
stainless-app[bot] authored Feb 12, 2025
1 parent 0a24e3f commit deaa8ed
Showing 55 changed files with 1,530 additions and 77 deletions.
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.1.0-alpha.1"
".": "0.1.0-alpha.2"
}
4 changes: 2 additions & 2 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
configured_endpoints: 106
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-da4c36c6b1d973f481abb8eefdeb085d88eaf37eeaba30d276cb3daa405b6f0c.yml
configured_endpoints: 111
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-36f9d46890bf3667f5a6529bdb156fe1560834ad8187c4271aa0b0024de1adb5.yml
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
# Changelog

## 0.1.0-alpha.2 (2025-02-12)

Full Changelog: [v0.1.0-alpha.1...v0.1.0-alpha.2](https://github.com/gitpod-io/gitpod-sdk-python/compare/v0.1.0-alpha.1...v0.1.0-alpha.2)

### Features

* **api:** manual updates ([#18](https://github.com/gitpod-io/gitpod-sdk-python/issues/18)) ([06b6d24](https://github.com/gitpod-io/gitpod-sdk-python/commit/06b6d240835591bac5f684eb4c5b948ad16c831a))
* **api:** manual updates ([#19](https://github.com/gitpod-io/gitpod-sdk-python/issues/19)) ([ad9f662](https://github.com/gitpod-io/gitpod-sdk-python/commit/ad9f6629f8ba9b829299c3e43efea320f80e9d62))
* **api:** manual updates ([#20](https://github.com/gitpod-io/gitpod-sdk-python/issues/20)) ([1a90a1b](https://github.com/gitpod-io/gitpod-sdk-python/commit/1a90a1bf843979c5ca263e88f36afd04265e7137))


### Chores

* update SDK settings ([#16](https://github.com/gitpod-io/gitpod-sdk-python/issues/16)) ([daa1308](https://github.com/gitpod-io/gitpod-sdk-python/commit/daa13087a8e0e3678365e5ef51cd3db2f4737327))

## 0.1.0-alpha.1 (2025-02-11)

Full Changelog: [v0.0.1-alpha.0...v0.1.0-alpha.1](https://github.com/gitpod-io/gitpod-sdk-python/compare/v0.0.1-alpha.0...v0.1.0-alpha.1)
9 changes: 3 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Gitpod Python API library

[![PyPI version](https://img.shields.io/pypi/v/gitpod.svg)](https://pypi.org/project/gitpod/)
[![PyPI version](https://img.shields.io/pypi/v/gitpod-sdk.svg)](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,
@@ -15,13 +15,10 @@ The REST API documentation can be found on [docs.gitpod.com](https://docs.gitpod
## Installation

```sh
# install from the production repo
pip install git+ssh://git@github.com/gitpod-io/gitpod-sdk-python.git
# install from PyPI
pip install --pre gitpod-sdk
```

> [!NOTE]
> Once this package is [published to PyPI](https://app.stainlessapi.com/docs/guides/publish), this will become: `pip install --pre gitpod`
## Usage

The full API of this library can be found in [api.md](api.md).
31 changes: 27 additions & 4 deletions api.md
Original file line number Diff line number Diff line change
@@ -9,11 +9,14 @@ from gitpod.types import (
Principal,
RunsOn,
Subject,
Task,
TaskExecution,
TaskExecutionMetadata,
TaskExecutionPhase,
TaskExecutionSpec,
TaskExecutionStatus,
TaskMetadata,
TaskSpec,
UserStatus,
)
```
@@ -141,9 +144,6 @@ Types:

```python
from gitpod.types.environments.automations import (
Task,
TaskMetadata,
TaskSpec,
TaskCreateResponse,
TaskRetrieveResponse,
TaskUpdateResponse,
@@ -157,7 +157,7 @@ Methods:
- <code title="post /gitpod.v1.EnvironmentAutomationService/CreateTask">client.environments.automations.tasks.<a href="./src/gitpod/resources/environments/automations/tasks/tasks.py">create</a>(\*\*<a href="src/gitpod/types/environments/automations/task_create_params.py">params</a>) -> <a href="./src/gitpod/types/environments/automations/task_create_response.py">TaskCreateResponse</a></code>
- <code title="post /gitpod.v1.EnvironmentAutomationService/GetTask">client.environments.automations.tasks.<a href="./src/gitpod/resources/environments/automations/tasks/tasks.py">retrieve</a>(\*\*<a href="src/gitpod/types/environments/automations/task_retrieve_params.py">params</a>) -> <a href="./src/gitpod/types/environments/automations/task_retrieve_response.py">TaskRetrieveResponse</a></code>
- <code title="post /gitpod.v1.EnvironmentAutomationService/UpdateTask">client.environments.automations.tasks.<a href="./src/gitpod/resources/environments/automations/tasks/tasks.py">update</a>(\*\*<a href="src/gitpod/types/environments/automations/task_update_params.py">params</a>) -> <a href="./src/gitpod/types/environments/automations/task_update_response.py">object</a></code>
- <code title="post /gitpod.v1.EnvironmentAutomationService/ListTasks">client.environments.automations.tasks.<a href="./src/gitpod/resources/environments/automations/tasks/tasks.py">list</a>(\*\*<a href="src/gitpod/types/environments/automations/task_list_params.py">params</a>) -> <a href="./src/gitpod/types/environments/automations/task.py">SyncTasksPage[Task]</a></code>
- <code title="post /gitpod.v1.EnvironmentAutomationService/ListTasks">client.environments.automations.tasks.<a href="./src/gitpod/resources/environments/automations/tasks/tasks.py">list</a>(\*\*<a href="src/gitpod/types/environments/automations/task_list_params.py">params</a>) -> <a href="./src/gitpod/types/shared/task.py">SyncTasksPage[Task]</a></code>
- <code title="post /gitpod.v1.EnvironmentAutomationService/DeleteTask">client.environments.automations.tasks.<a href="./src/gitpod/resources/environments/automations/tasks/tasks.py">delete</a>(\*\*<a href="src/gitpod/types/environments/automations/task_delete_params.py">params</a>) -> <a href="./src/gitpod/types/environments/automations/task_delete_response.py">object</a></code>
- <code title="post /gitpod.v1.EnvironmentAutomationService/StartTask">client.environments.automations.tasks.<a href="./src/gitpod/resources/environments/automations/tasks/tasks.py">start</a>(\*\*<a href="src/gitpod/types/environments/automations/task_start_params.py">params</a>) -> <a href="./src/gitpod/types/environments/automations/task_start_response.py">TaskStartResponse</a></code>

@@ -259,6 +259,29 @@ Methods:
- <code title="post /gitpod.v1.OrganizationService/ListMembers">client.organizations.<a href="./src/gitpod/resources/organizations/organizations.py">list_members</a>(\*\*<a href="src/gitpod/types/organization_list_members_params.py">params</a>) -> <a href="./src/gitpod/types/organization_member.py">SyncMembersPage[OrganizationMember]</a></code>
- <code title="post /gitpod.v1.OrganizationService/SetRole">client.organizations.<a href="./src/gitpod/resources/organizations/organizations.py">set_role</a>(\*\*<a href="src/gitpod/types/organization_set_role_params.py">params</a>) -> <a href="./src/gitpod/types/organization_set_role_response.py">object</a></code>

## DomainVerifications

Types:

```python
from gitpod.types.organizations import (
DomainVerification,
DomainVerificationState,
DomainVerificationCreateResponse,
DomainVerificationRetrieveResponse,
DomainVerificationDeleteResponse,
DomainVerificationVerifyResponse,
)
```

Methods:

- <code title="post /gitpod.v1.OrganizationService/CreateDomainVerification">client.organizations.domain_verifications.<a href="./src/gitpod/resources/organizations/domain_verifications.py">create</a>(\*\*<a href="src/gitpod/types/organizations/domain_verification_create_params.py">params</a>) -> <a href="./src/gitpod/types/organizations/domain_verification_create_response.py">DomainVerificationCreateResponse</a></code>
- <code title="post /gitpod.v1.OrganizationService/GetDomainVerification">client.organizations.domain_verifications.<a href="./src/gitpod/resources/organizations/domain_verifications.py">retrieve</a>(\*\*<a href="src/gitpod/types/organizations/domain_verification_retrieve_params.py">params</a>) -> <a href="./src/gitpod/types/organizations/domain_verification_retrieve_response.py">DomainVerificationRetrieveResponse</a></code>
- <code title="post /gitpod.v1.OrganizationService/ListDomainVerifications">client.organizations.domain_verifications.<a href="./src/gitpod/resources/organizations/domain_verifications.py">list</a>(\*\*<a href="src/gitpod/types/organizations/domain_verification_list_params.py">params</a>) -> <a href="./src/gitpod/types/organizations/domain_verification.py">SyncDomainVerificationsPage[DomainVerification]</a></code>
- <code title="post /gitpod.v1.OrganizationService/DeleteDomainVerification">client.organizations.domain_verifications.<a href="./src/gitpod/resources/organizations/domain_verifications.py">delete</a>(\*\*<a href="src/gitpod/types/organizations/domain_verification_delete_params.py">params</a>) -> <a href="./src/gitpod/types/organizations/domain_verification_delete_response.py">object</a></code>
- <code title="post /gitpod.v1.OrganizationService/VerifyDomain">client.organizations.domain_verifications.<a href="./src/gitpod/resources/organizations/domain_verifications.py">verify</a>(\*\*<a href="src/gitpod/types/organizations/domain_verification_verify_params.py">params</a>) -> <a href="./src/gitpod/types/organizations/domain_verification_verify_response.py">DomainVerificationVerifyResponse</a></code>

## Invites

Types:
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "gitpod"
version = "0.1.0-alpha.1"
name = "gitpod-sdk"
version = "0.1.0-alpha.2"
description = "The official Python library for the gitpod API"
dynamic = ["readme"]
license = "Apache-2.0"
12 changes: 6 additions & 6 deletions requirements-dev.lock
Original file line number Diff line number Diff line change
@@ -12,7 +12,7 @@
annotated-types==0.6.0
# via pydantic
anyio==4.4.0
# via gitpod
# via gitpod-sdk
# via httpx
argcomplete==3.1.2
# via nox
@@ -25,7 +25,7 @@ dirty-equals==0.6.0
distlib==0.3.7
# via virtualenv
distro==1.8.0
# via gitpod
# via gitpod-sdk
exceptiongroup==1.2.2
# via anyio
# via pytest
@@ -36,7 +36,7 @@ h11==0.14.0
httpcore==1.0.2
# via httpx
httpx==0.28.1
# via gitpod
# via gitpod-sdk
# via respx
idna==3.4
# via anyio
@@ -63,7 +63,7 @@ platformdirs==3.11.0
pluggy==1.5.0
# via pytest
pydantic==2.10.3
# via gitpod
# via gitpod-sdk
pydantic-core==2.27.1
# via pydantic
pygments==2.18.0
@@ -85,14 +85,14 @@ six==1.16.0
# via python-dateutil
sniffio==1.3.0
# via anyio
# via gitpod
# via gitpod-sdk
time-machine==2.9.0
tomli==2.0.2
# via mypy
# via pytest
typing-extensions==4.12.2
# via anyio
# via gitpod
# via gitpod-sdk
# via mypy
# via pydantic
# via pydantic-core
12 changes: 6 additions & 6 deletions requirements.lock
Original file line number Diff line number Diff line change
@@ -12,33 +12,33 @@
annotated-types==0.6.0
# via pydantic
anyio==4.4.0
# via gitpod
# via gitpod-sdk
# via httpx
certifi==2023.7.22
# via httpcore
# via httpx
distro==1.8.0
# via gitpod
# via gitpod-sdk
exceptiongroup==1.2.2
# via anyio
h11==0.14.0
# via httpcore
httpcore==1.0.2
# via httpx
httpx==0.28.1
# via gitpod
# via gitpod-sdk
idna==3.4
# via anyio
# via httpx
pydantic==2.10.3
# via gitpod
# via gitpod-sdk
pydantic-core==2.27.1
# via pydantic
sniffio==1.3.0
# via anyio
# via gitpod
# via gitpod-sdk
typing-extensions==4.12.2
# via anyio
# via gitpod
# via gitpod-sdk
# via pydantic
# via pydantic-core
2 changes: 1 addition & 1 deletion src/gitpod/_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__ = "gitpod"
__version__ = "0.1.0-alpha.1" # x-release-please-version
__version__ = "0.1.0-alpha.2" # x-release-please-version
53 changes: 53 additions & 0 deletions src/gitpod/pagination.py
Original file line number Diff line number Diff line change
@@ -9,6 +9,9 @@
from ._base_client import BasePage, PageInfo, BaseSyncPage, BaseAsyncPage

__all__ = [
"DomainVerificationsPagePagination",
"SyncDomainVerificationsPage",
"AsyncDomainVerificationsPage",
"EditorsPagePagination",
"SyncEditorsPage",
"AsyncEditorsPage",
@@ -71,6 +74,56 @@
_T = TypeVar("_T")


class DomainVerificationsPagePagination(BaseModel):
next_token: Optional[str] = FieldInfo(alias="nextToken", default=None)


class SyncDomainVerificationsPage(BaseSyncPage[_T], BasePage[_T], Generic[_T]):
domain_verifications: List[_T] = FieldInfo(alias="domainVerifications")
pagination: Optional[DomainVerificationsPagePagination] = None

@override
def _get_page_items(self) -> List[_T]:
domain_verifications = self.domain_verifications
if not domain_verifications:
return []
return domain_verifications

@override
def next_page_info(self) -> Optional[PageInfo]:
next_token = None
if self.pagination is not None:
if self.pagination.next_token is not None:
next_token = self.pagination.next_token
if not next_token:
return None

return PageInfo(params={"token": next_token})


class AsyncDomainVerificationsPage(BaseAsyncPage[_T], BasePage[_T], Generic[_T]):
domain_verifications: List[_T] = FieldInfo(alias="domainVerifications")
pagination: Optional[DomainVerificationsPagePagination] = None

@override
def _get_page_items(self) -> List[_T]:
domain_verifications = self.domain_verifications
if not domain_verifications:
return []
return domain_verifications

@override
def next_page_info(self) -> Optional[PageInfo]:
next_token = None
if self.pagination is not None:
if self.pagination.next_token is not None:
next_token = self.pagination.next_token
if not next_token:
return None

return PageInfo(params={"token": next_token})


class EditorsPagePagination(BaseModel):
next_token: Optional[str] = FieldInfo(alias="nextToken", default=None)

14 changes: 7 additions & 7 deletions src/gitpod/resources/environments/automations/tasks/tasks.py
Original file line number Diff line number Diff line change
@@ -29,6 +29,8 @@
)
from .....pagination import SyncTasksPage, AsyncTasksPage
from ....._base_client import AsyncPaginator, make_request_options
from .....types.shared.task import Task
from .....types.shared_params.task_spec import TaskSpec
from .....types.environments.automations import (
task_list_params,
task_start_params,
@@ -37,9 +39,7 @@
task_update_params,
task_retrieve_params,
)
from .....types.environments.automations.task import Task
from .....types.environments.automations.task_spec_param import TaskSpecParam
from .....types.environments.automations.task_metadata_param import TaskMetadataParam
from .....types.shared_params.task_metadata import TaskMetadata
from .....types.environments.automations.task_start_response import TaskStartResponse
from .....types.environments.automations.task_create_response import TaskCreateResponse
from .....types.environments.automations.task_retrieve_response import TaskRetrieveResponse
@@ -76,8 +76,8 @@ def create(
*,
depends_on: List[str] | NotGiven = NOT_GIVEN,
environment_id: str | NotGiven = NOT_GIVEN,
metadata: TaskMetadataParam | NotGiven = NOT_GIVEN,
spec: TaskSpecParam | NotGiven = NOT_GIVEN,
metadata: TaskMetadata | NotGiven = NOT_GIVEN,
spec: TaskSpec | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -344,8 +344,8 @@ async def create(
*,
depends_on: List[str] | NotGiven = NOT_GIVEN,
environment_id: str | NotGiven = NOT_GIVEN,
metadata: TaskMetadataParam | NotGiven = NOT_GIVEN,
spec: TaskSpecParam | NotGiven = NOT_GIVEN,
metadata: TaskMetadata | NotGiven = NOT_GIVEN,
spec: TaskSpec | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
8 changes: 0 additions & 8 deletions src/gitpod/resources/environments/environments.py
Original file line number Diff line number Diff line change
@@ -248,7 +248,6 @@ def list(
token: str | NotGiven = NOT_GIVEN,
page_size: int | NotGiven = NOT_GIVEN,
filter: environment_list_params.Filter | NotGiven = NOT_GIVEN,
organization_id: str | NotGiven = NOT_GIVEN,
pagination: environment_list_params.Pagination | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -261,8 +260,6 @@ def list(
ListEnvironments returns a list of environments that match the query.
Args:
organization_id: organization_id is the ID of the organization that contains the environments
pagination: pagination contains the pagination options for listing environments
extra_headers: Send extra headers
@@ -279,7 +276,6 @@ def list(
body=maybe_transform(
{
"filter": filter,
"organization_id": organization_id,
"pagination": pagination,
},
environment_list_params.EnvironmentListParams,
@@ -739,7 +735,6 @@ def list(
token: str | NotGiven = NOT_GIVEN,
page_size: int | NotGiven = NOT_GIVEN,
filter: environment_list_params.Filter | NotGiven = NOT_GIVEN,
organization_id: str | NotGiven = NOT_GIVEN,
pagination: environment_list_params.Pagination | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -752,8 +747,6 @@ def list(
ListEnvironments returns a list of environments that match the query.
Args:
organization_id: organization_id is the ID of the organization that contains the environments
pagination: pagination contains the pagination options for listing environments
extra_headers: Send extra headers
@@ -770,7 +763,6 @@ def list(
body=maybe_transform(
{
"filter": filter,
"organization_id": organization_id,
"pagination": pagination,
},
environment_list_params.EnvironmentListParams,
Loading
Oops, something went wrong.

0 comments on commit deaa8ed

Please sign in to comment.