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
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.4.1"
".": "0.4.2"
}
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# Changelog

## 0.4.2 (2025-12-08)

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

### Bug Fixes

* **types:** allow pyright to infer TypedDict types within SequenceNotStr ([cea547d](https://github.com/gitpod-io/gitpod-sdk-python/commit/cea547dff0e77fd9f3d913790e5bb85f7c566209))


### Chores

* add missing docstrings ([00778fe](https://github.com/gitpod-io/gitpod-sdk-python/commit/00778fe498f509982a2cee08c43ac9c9a4377e3e))

## 0.4.1 (2025-12-05)

Full Changelog: [v0.4.0...v0.4.1](https://github.com/gitpod-io/gitpod-sdk-python/compare/v0.4.0...v0.4.1)
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 = "gitpod-sdk"
version = "0.4.1"
version = "0.4.2"
description = "The official Python library for the gitpod API"
dynamic = ["readme"]
license = "Apache-2.0"
Expand Down
5 changes: 3 additions & 2 deletions src/gitpod/_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,9 @@ class HttpxSendArgs(TypedDict, total=False):
if TYPE_CHECKING:
# This works because str.__contains__ does not accept object (either in typeshed or at runtime)
# https://github.com/hauntsaninja/useful_types/blob/5e9710f3875107d068e7679fd7fec9cfab0eff3b/useful_types/__init__.py#L285
#
# Note: index() and count() methods are intentionally omitted to allow pyright to properly
# infer TypedDict types when dict literals are used in lists assigned to SequenceNotStr.
class SequenceNotStr(Protocol[_T_co]):
@overload
def __getitem__(self, index: SupportsIndex, /) -> _T_co: ...
Expand All @@ -251,8 +254,6 @@ def __getitem__(self, index: slice, /) -> Sequence[_T_co]: ...
def __contains__(self, value: object, /) -> bool: ...
def __len__(self) -> int: ...
def __iter__(self) -> Iterator[_T_co]: ...
def index(self, value: Any, start: int = 0, stop: int = ..., /) -> int: ...
def count(self, value: Any, /) -> int: ...
def __reversed__(self) -> Iterator[_T_co]: ...
else:
# just point this to a normal `Sequence` at runtime to avoid having to special case
Expand Down
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.4.1" # x-release-please-version
__version__ = "0.4.2" # x-release-please-version
4 changes: 4 additions & 0 deletions src/gitpod/types/account_list_login_providers_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,15 @@ class AccountListLoginProvidersParams(TypedDict, total=False):


class Filter(TypedDict, total=False):
"""filter contains the filter options for listing login methods"""

invite_id: Annotated[str, PropertyInfo(alias="inviteId")]
"""invite_id is the ID of the invite URL the user wants to login with"""


class Pagination(TypedDict, total=False):
"""pagination contains the pagination options for listing login methods"""

token: str
"""
Token for the next set of results that was returned as next_token of a
Expand Down
4 changes: 4 additions & 0 deletions src/gitpod/types/editor_list_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ class EditorListParams(TypedDict, total=False):


class Filter(TypedDict, total=False):
"""filter contains the filter options for listing editors"""

allowed_by_policy: Annotated[bool, PropertyInfo(alias="allowedByPolicy")]
"""
allowed_by_policy filters the response to only editors that are allowed by the
Expand All @@ -30,6 +32,8 @@ class Filter(TypedDict, total=False):


class Pagination(TypedDict, total=False):
"""pagination contains the pagination options for listing environments"""

token: str
"""
Token for the next set of results that was returned as next_token of a
Expand Down
2 changes: 2 additions & 0 deletions src/gitpod/types/environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@


class Environment(BaseModel):
"""+resource get environment"""

id: str
"""ID is a unique identifier of this environment.

Expand Down
2 changes: 2 additions & 0 deletions src/gitpod/types/environment_activity_signal.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@


class EnvironmentActivitySignal(BaseModel):
"""EnvironmentActivitySignal used to signal activity for an environment."""

source: Optional[str] = None
"""
source of the activity signal, such as "VS Code", "SSH", or "Automations". It
Expand Down
2 changes: 2 additions & 0 deletions src/gitpod/types/environment_activity_signal_param.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@


class EnvironmentActivitySignalParam(TypedDict, total=False):
"""EnvironmentActivitySignal used to signal activity for an environment."""

source: str
"""
source of the activity signal, such as "VS Code", "SSH", or "Automations". It
Expand Down
2 changes: 2 additions & 0 deletions src/gitpod/types/environment_initializer.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,6 @@ class Spec(BaseModel):


class EnvironmentInitializer(BaseModel):
"""EnvironmentInitializer specifies how an environment is to be initialized"""

specs: Optional[List[Spec]] = None
2 changes: 2 additions & 0 deletions src/gitpod/types/environment_initializer_param.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,6 @@ class Spec(TypedDict, total=False):


class EnvironmentInitializerParam(TypedDict, total=False):
"""EnvironmentInitializer specifies how an environment is to be initialized"""

specs: Iterable[Spec]
2 changes: 2 additions & 0 deletions src/gitpod/types/environment_list_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ class Filter(TypedDict, total=False):


class Pagination(TypedDict, total=False):
"""pagination contains the pagination options for listing environments"""

token: str
"""
Token for the next set of results that was returned as next_token of a
Expand Down
5 changes: 5 additions & 0 deletions src/gitpod/types/environment_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@


class EnvironmentMetadata(BaseModel):
"""
EnvironmentMetadata is data associated with an environment that's required for
other parts of the system to function
"""

annotations: Optional[Dict[str, str]] = None
"""
annotations are key/value pairs that gets attached to the environment.
Expand Down
17 changes: 17 additions & 0 deletions src/gitpod/types/environment_spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@


class AutomationsFile(BaseModel):
"""automations_file is the automations file spec of the environment"""

automations_file_path: Optional[str] = FieldInfo(alias="automationsFilePath", default=None)
"""
automations_file_path is the path to the automations file that is applied in the
Expand All @@ -39,6 +41,8 @@ class AutomationsFile(BaseModel):


class Content(BaseModel):
"""content is the content spec of the environment"""

git_email: Optional[str] = FieldInfo(alias="gitEmail", default=None)
"""The Git email address"""

Expand All @@ -52,11 +56,15 @@ class Content(BaseModel):


class DevcontainerDotfiles(BaseModel):
"""Experimental: dotfiles is the dotfiles configuration of the devcontainer"""

repository: str
"""URL of a dotfiles Git repository (e.g. https://github.com/owner/repository)"""


class Devcontainer(BaseModel):
"""devcontainer is the devcontainer spec of the environment"""

default_devcontainer_image: Optional[str] = FieldInfo(alias="defaultDevcontainerImage", default=None)
"""
default_devcontainer_image is the default image that is used to start the
Expand All @@ -80,6 +88,8 @@ class Devcontainer(BaseModel):


class Machine(BaseModel):
"""machine is the machine spec of the environment"""

class_: Optional[str] = FieldInfo(alias="class", default=None)
"""Class denotes the class of the environment we ought to start"""

Expand Down Expand Up @@ -139,6 +149,8 @@ class SSHPublicKey(BaseModel):


class Timeout(BaseModel):
"""Timeout configures the environment timeout"""

disconnected: Optional[str] = None
"""
inacitivity is the maximum time of disconnection before the environment is
Expand All @@ -147,6 +159,11 @@ class Timeout(BaseModel):


class EnvironmentSpec(BaseModel):
"""
EnvironmentSpec specifies the configuration of an environment for an environment
start
"""

admission: Optional[AdmissionLevel] = None
"""admission controlls who can access the environment and its ports."""

Expand Down
17 changes: 17 additions & 0 deletions src/gitpod/types/environment_spec_param.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@


class AutomationsFile(TypedDict, total=False):
"""automations_file is the automations file spec of the environment"""

automations_file_path: Annotated[str, PropertyInfo(alias="automationsFilePath")]
"""
automations_file_path is the path to the automations file that is applied in the
Expand All @@ -40,6 +42,8 @@ class AutomationsFile(TypedDict, total=False):


class Content(TypedDict, total=False):
"""content is the content spec of the environment"""

git_email: Annotated[str, PropertyInfo(alias="gitEmail")]
"""The Git email address"""

Expand All @@ -53,11 +57,15 @@ class Content(TypedDict, total=False):


class DevcontainerDotfiles(TypedDict, total=False):
"""Experimental: dotfiles is the dotfiles configuration of the devcontainer"""

repository: Required[str]
"""URL of a dotfiles Git repository (e.g. https://github.com/owner/repository)"""


class Devcontainer(TypedDict, total=False):
"""devcontainer is the devcontainer spec of the environment"""

default_devcontainer_image: Annotated[str, PropertyInfo(alias="defaultDevcontainerImage")]
"""
default_devcontainer_image is the default image that is used to start the
Expand Down Expand Up @@ -90,6 +98,8 @@ class Devcontainer(TypedDict, total=False):


class Machine(_MachineReservedKeywords, total=False):
"""machine is the machine spec of the environment"""

session: str


Expand Down Expand Up @@ -146,6 +156,8 @@ class SSHPublicKey(TypedDict, total=False):


class Timeout(TypedDict, total=False):
"""Timeout configures the environment timeout"""

disconnected: str
"""
inacitivity is the maximum time of disconnection before the environment is
Expand All @@ -154,6 +166,11 @@ class Timeout(TypedDict, total=False):


class EnvironmentSpecParam(TypedDict, total=False):
"""
EnvironmentSpec specifies the configuration of an environment for an environment
start
"""

admission: AdmissionLevel
"""admission controlls who can access the environment and its ports."""

Expand Down
30 changes: 30 additions & 0 deletions src/gitpod/types/environment_status.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@


class AutomationsFile(BaseModel):
"""automations_file contains the status of the automations file."""

automations_file_path: Optional[str] = FieldInfo(alias="automationsFilePath", default=None)
"""
automations_file_path is the path to the automations file relative to the repo
Expand Down Expand Up @@ -93,6 +95,12 @@ class ContentGitChangedFile(BaseModel):


class ContentGit(BaseModel):
"""
git is the Git working copy status of the environment.
Note: this is a best-effort field and more often than not will not be
present. Its absence does not indicate the absence of a working copy.
"""

branch: Optional[str] = None
"""branch is branch we're currently on"""

Expand Down Expand Up @@ -124,6 +132,8 @@ class ContentGit(BaseModel):


class Content(BaseModel):
"""content contains the status of the environment content."""

content_location_in_machine: Optional[str] = FieldInfo(alias="contentLocationInMachine", default=None)
"""content_location_in_machine is the location of the content in the machine"""

Expand Down Expand Up @@ -160,6 +170,8 @@ class Content(BaseModel):


class Devcontainer(BaseModel):
"""devcontainer contains the status of the devcontainer."""

container_id: Optional[str] = FieldInfo(alias="containerId", default=None)
"""container_id is the ID of the container."""

Expand Down Expand Up @@ -231,10 +243,17 @@ class EnvironmentURLsPort(BaseModel):


class EnvironmentURLsSSH(BaseModel):
"""SSH is the URL at which the environment can be accessed via SSH."""

url: Optional[str] = None


class EnvironmentURLs(BaseModel):
"""
environment_url contains the URL at which the environment can be accessed.
This field is only set if the environment is running.
"""

logs: Optional[str] = None
"""logs is the URL at which the environment logs can be accessed."""

Expand All @@ -245,12 +264,16 @@ class EnvironmentURLs(BaseModel):


class MachineVersions(BaseModel):
"""versions contains the versions of components in the machine."""

supervisor_commit: Optional[str] = FieldInfo(alias="supervisorCommit", default=None)

supervisor_version: Optional[str] = FieldInfo(alias="supervisorVersion", default=None)


class Machine(BaseModel):
"""machine contains the status of the environment machine"""

failure_message: Optional[str] = FieldInfo(alias="failureMessage", default=None)
"""failure_message contains the reason the machine failed to operate."""

Expand Down Expand Up @@ -288,6 +311,11 @@ class Machine(BaseModel):


class RunnerAck(BaseModel):
"""
runner_ack contains the acknowledgement from the runner that is has
received the environment spec.
"""

message: Optional[str] = None

spec_version: Optional[str] = FieldInfo(alias="specVersion", default=None)
Expand Down Expand Up @@ -350,6 +378,8 @@ class SSHPublicKey(BaseModel):


class EnvironmentStatus(BaseModel):
"""EnvironmentStatus describes an environment status"""

activity_signal: Optional[EnvironmentActivitySignal] = FieldInfo(alias="activitySignal", default=None)
"""activity_signal is the last activity signal for the environment."""

Expand Down
4 changes: 4 additions & 0 deletions src/gitpod/types/environment_update_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ class Metadata(TypedDict, total=False):


class SpecAutomationsFile(TypedDict, total=False):
"""automations_file is the automations file spec of the environment"""

automations_file_path: Annotated[Optional[str], PropertyInfo(alias="automationsFilePath")]
"""
automations_file_path is the path to the automations file that is applied in the
Expand Down Expand Up @@ -106,6 +108,8 @@ class SpecSSHPublicKey(TypedDict, total=False):


class SpecTimeout(TypedDict, total=False):
"""Timeout configures the environment timeout"""

disconnected: Optional[str]
"""
inacitivity is the maximum time of disconnection before the environment is
Expand Down
Loading