Skip to content
Merged
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
7 changes: 6 additions & 1 deletion .github/workflows/sdk-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,10 @@ jobs:
# Verification only, never auto-fix: the SDK is generated formatted, so a diff here means
# either hand-edited custom code or a regenerate that was not committed. ruff is pinned to
# the release that produced these bytes, since a formatter minor can change them.
- run: python -m pip install "ruff==0.16.8"
- run: python -m pip install "ruff==0.17.4"
- run: ruff format --check .
# The smoke tests skip unless TEST_API_BASE_URL is set, so this only proves every test module
# imports against the installed SDK; it never calls the API.
- run: python -m pip install --upgrade pip
- run: python -m pip install . --group dev
- run: python -m pytest
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.7.0"
".": "0.8.0"
}
29 changes: 29 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,34 @@
# Changelog

## [0.8.0](https://github.com/dedalus-labs/dedalus-python/compare/v0.7.0...v0.8.0) (2026-11-20)


### ⚠ BREAKING CHANGES

* **api:** 3 breaking changes to the SDK surface.
- response-shape GET v1/images→.image_ids — field only in before (breaking: removed; items appeared in its place, likely a rename)
- types-files types/autoresizing_switch.py — type file only in before (1 member: 0 matched by name and kind elsewhere in after, 1 not found) (breaking: the new snapshot no longer has it)
- types-classes types/__init__.py:AutoresizingSwitch — reexport only in before (breaking: the new snapshot no longer has it)
* **api:** 4 breaking changes to the SDK surface.
- Property `policy.cpu` type changed from `enum(on | off)` to `autoresizing_switch`.
- Property `policy.memory` type changed from `enum(on | off)` to `autoresizing_switch`.
- Property `autoresizing_update.cpu` type changed from `enum(on | off)` to `autoresizing_switch`.
- Property `autoresizing_update.memory` type changed from `enum(on | off)` to `autoresizing_switch`.

### Features

* **api:** share autoresizing switch type ([3a15ddf](https://github.com/dedalus-labs/dedalus-python/commit/3a15ddf961720e90a49aa5eb4a8f417d56e0f17d))
* **api:** update property policy.cpu (+4 more changes) ([eb49ee9](https://github.com/dedalus-labs/dedalus-python/commit/eb49ee968e265f7ecadaa263f376049dc7048ec6))
* **api:** update SDK surface (31 changes) ([614dadd](https://github.com/dedalus-labs/dedalus-python/commit/614dadde6ca66c3e745a0f8618f5c04a1f39701e))


### Chores

* **api:** update generated SDK content ([947b94c](https://github.com/dedalus-labs/dedalus-python/commit/947b94cdb9da7800aa5fea9c117e49616bc966a4))
* **api:** update generated SDK content ([584e0fd](https://github.com/dedalus-labs/dedalus-python/commit/584e0fdd70741545f8a92bc173095ea8df43f3c2))
* **contract:** pin the contract with machine ports ([99abe5c](https://github.com/dedalus-labs/dedalus-python/commit/99abe5ca92f2e5c42ca8257cb149aef6f538554b))
* **contract:** pin the contract with machine ports ([#21](https://github.com/dedalus-labs/dedalus-python/issues/21)) ([ba707f6](https://github.com/dedalus-labs/dedalus-python/commit/ba707f64166425a4e842dee52b3c31fad42d8924))

## [0.7.0](https://github.com/dedalus-labs/dedalus-python/compare/v0.6.0...v0.7.0) (2026-11-06)


Expand Down
60 changes: 58 additions & 2 deletions api-contract.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"source_sha": "9f8d54f123e81b8bc7252f855c52ecbf7cc8ae42",
"spec_sha256": "c0b2db893e3017c5c83c14375e6085581584641f617ee7ea1305ab80e9b50421",
"source_sha": "33b1723ceb008dfddf66ed9939c1c69aef73fd91",
"spec_sha256": "bb5bd464c8160621397668abdcd19834cbae34629865d4fd98c588f3c083d122",
"operations": [
{
"method": "GET",
Expand Down Expand Up @@ -138,6 +138,62 @@
"path": "/v1/machines/{machine_id}/executions/{execution_id}/output",
"bodyParams": []
},
{
"method": "GET",
"path": "/v1/machines/{machine_id}/ports",
"bodyParams": []
},
{
"method": "POST",
"path": "/v1/machines/{machine_id}/ports",
"bodyParams": [
"expires",
"port",
"protocol",
"visibility"
]
},
{
"method": "DELETE",
"path": "/v1/machines/{machine_id}/ports/{port_id}",
"bodyParams": []
},
{
"method": "GET",
"path": "/v1/machines/{machine_id}/ports/{port_id}",
"bodyParams": []
},
{
"method": "PATCH",
"path": "/v1/machines/{machine_id}/ports/{port_id}",
"bodyParams": [
"visibility"
]
},
{
"method": "GET",
"path": "/v1/machines/{machine_id}/ports/{port_id}/access-keys",
"bodyParams": []
},
{
"method": "POST",
"path": "/v1/machines/{machine_id}/ports/{port_id}/access-keys",
"bodyParams": [
"expires_in"
]
},
{
"method": "DELETE",
"path": "/v1/machines/{machine_id}/ports/{port_id}/access-keys/{access_key_id}",
"bodyParams": []
},
{
"method": "POST",
"path": "/v1/machines/{machine_id}/ports/{port_id}/access-keys/{access_key_id}/rotate",
"bodyParams": [
"expires_in"
]
},
{
"method": "POST",
"path": "/v1/machines/{machine_id}/reboot",
Expand Down
157 changes: 153 additions & 4 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,23 @@ Complete reference of every operation, grouped by resource. See [the README](./R
- [`Machines Autoresizing`](#machines-autoresizing)
- [Read this machine's autoresizing settings](#read-this-machines-autoresizing-settings)
- [Set this machine's autoresizing settings](#set-this-machines-autoresizing-settings)
- [`Machines Ports`](#machines-ports)
- [List ports](#list-ports)
- [Create port](#create-port)
- [Get port](#get-port)
- [Update port](#update-port)
- [Delete port](#delete-port)
- [`Machines Ports AccessKeys`](#machines-ports-accesskeys)
- [List port access keys](#list-port-access-keys)
- [Mint port access key](#mint-port-access-key)
- [Revoke port access key](#revoke-port-access-key)
- [Rotate port access key](#rotate-port-access-key)
- [`Organization`](#organization)
- [`Organization Autoresizing`](#organization-autoresizing)
- [Read organization autoresizing policy](#read-organization-autoresizing-policy)
- [Set organization autoresizing policy](#set-organization-autoresizing-policy)
- [`Images`](#images)
- [List image IDs owned by the authenticated organization](#list-image-ids-owned-by-the-authenticated-organization)
- [List images owned by the authenticated organization](#list-images-owned-by-the-authenticated-organization)
- [Register an immutable OCI image for preparation](#register-an-immutable-oci-image-for-preparation)
- [Read preparation status for an organization-owned image](#read-preparation-status-for-an-organization-owned-image)
- [Rename an organization-owned image](#rename-an-organization-owned-image)
Expand Down Expand Up @@ -383,6 +394,144 @@ autoresizing = client.machines.autoresizing.update(
)
```

### `Machines Ports`

#### List ports

| Direction | Type |
| --- | --- |
| Request | [`PortListParams`](./src/dedalus_sdk/types/machines/port_list_params.py) |

```python
page = client.machines.ports.list(
machine_id="017f22e2-79b0-7cc3-98c4-dc0c0c07398f",
)
```

#### Create port

| Direction | Type |
| --- | --- |
| Request | [`PortCreateParams`](./src/dedalus_sdk/types/machines/port_create_params.py) |
| Response | [`Port`](./src/dedalus_sdk/types/machines/port.py) |

```python
port = client.machines.ports.create(
machine_id="017f22e2-79b0-7cc3-98c4-dc0c0c07398f",
port=0,
protocol="http",
visibility="private",
idempotency_key="",
)
```

#### Get port

| Direction | Type |
| --- | --- |
| Response | [`Port`](./src/dedalus_sdk/types/machines/port.py) |

```python
port = client.machines.ports.retrieve(
machine_id="017f22e2-79b0-7cc3-98c4-dc0c0c07398f",
port_id="portID",
)
```

#### Update port

| Direction | Type |
| --- | --- |
| Request | [`PortUpdateParams`](./src/dedalus_sdk/types/machines/port_update_params.py) |
| Response | [`Port`](./src/dedalus_sdk/types/machines/port.py) |

```python
port = client.machines.ports.update(
machine_id="017f22e2-79b0-7cc3-98c4-dc0c0c07398f",
port_id="portID",
visibility="public",
idempotency_key="",
)
```

#### Delete port

| Direction | Type |
| --- | --- |
| Response | [`Port`](./src/dedalus_sdk/types/machines/port.py) |

```python
port = client.machines.ports.delete(
machine_id="017f22e2-79b0-7cc3-98c4-dc0c0c07398f",
port_id="portID",
idempotency_key="",
)
```

#### `Machines Ports AccessKeys`

##### List port access keys

| Direction | Type |
| --- | --- |
| Request | [`AccessKeyListParams`](./src/dedalus_sdk/types/machines/ports/access_key_list_params.py) |
| Response | [`AccessKeyListResponse`](./src/dedalus_sdk/types/machines/ports/access_key_list_response.py) |

```python
access_key = client.machines.ports.access_keys.list(
machine_id="017f22e2-79b0-7cc3-98c4-dc0c0c07398f",
port_id="portID",
)
```

##### Mint port access key

| Direction | Type |
| --- | --- |
| Request | [`AccessKeyMintParams`](./src/dedalus_sdk/types/machines/ports/access_key_mint_params.py) |
| Response | [`AccessKeyMintResponse`](./src/dedalus_sdk/types/machines/ports/access_key_mint_response.py) |

```python
access_key = client.machines.ports.access_keys.mint(
machine_id="017f22e2-79b0-7cc3-98c4-dc0c0c07398f",
port_id="portID",
expires_in=1,
idempotency_key="",
)
```

##### Revoke port access key

| Direction | Type |
| --- | --- |
| Response | [`AccessKeyRevokeResponse`](./src/dedalus_sdk/types/machines/ports/access_key_revoke_response.py) |

```python
access_key = client.machines.ports.access_keys.revoke(
machine_id="017f22e2-79b0-7cc3-98c4-dc0c0c07398f",
port_id="portID",
access_key_id="accessKeyID",
idempotency_key="",
)
```

##### Rotate port access key

| Direction | Type |
| --- | --- |
| Request | [`AccessKeyRotateParams`](./src/dedalus_sdk/types/machines/ports/access_key_rotate_params.py) |
| Response | [`AccessKeyRotateResponse`](./src/dedalus_sdk/types/machines/ports/access_key_rotate_response.py) |

```python
access_key = client.machines.ports.access_keys.rotate(
machine_id="017f22e2-79b0-7cc3-98c4-dc0c0c07398f",
port_id="portID",
access_key_id="accessKeyID",
expires_in=1,
idempotency_key="",
)
```

## `Organization`

### `Organization Autoresizing`
Expand Down Expand Up @@ -414,17 +563,17 @@ autoresizing = client.organization.autoresizing.update(

## `Images`

### List image IDs owned by the authenticated organization
### List images owned by the authenticated organization

Pages through the organization's images in ID order. A deleted image is left out; it still reads by ID.
Pages through the organization's images in ID order. Each item has the same shape as a single image read. A deleted image is left out; it still reads by ID.

| Direction | Type |
| --- | --- |
| Request | [`ImageListParams`](./src/dedalus_sdk/types/image_list_params.py) |
| Response | [`ImageList`](./src/dedalus_sdk/types/image_list.py) |

```python
image = client.images.list(
images = client.images.list(
limit=100,
)
```
Expand Down
10 changes: 5 additions & 5 deletions generation-provenance.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"source_spec_sha": "9f8d54f123e81b8bc7252f855c52ecbf7cc8ae42",
"source_spec_sha256": "c0b2db893e3017c5c83c14375e6085581584641f617ee7ea1305ab80e9b50421",
"source_spec_sha": "f5b640b324aafb001a8da6facd807f13197630bb",
"source_spec_sha256": "a717ed108ea8bbb6b9c0b70255a07da7e9a01224c6941546089084e02097a632",
"generator_version": "0.38.0",
"build_version": "0.1.16",
"configuration_sha256": "10d2f59b8a69dce627060e1104eac425cec104dd90d3177c08a29a902cb48875",
"build_version": "0.1.19",
"configuration_sha256": "477d944077da8e1163423c505fe3f773cce14eda953aa934fe91582d04e4e915",
"operation_count": 31,
"generated_commit": "bc3e12c4dd8d4d0557b5e2847049a2ecc7df21df",
"generated_commit": "947b94cdb9da7800aa5fea9c117e49616bc966a4",
"download_sha256": null,
"integration_base": "scalar-next",
"published_package": false
Expand Down
8 changes: 7 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "dedalus-sdk"
version = "0.7.0" # x-release-please-version
version = "0.8.0" # x-release-please-version
description = "Create, run, and manage Dedalus Machines."
readme = "README.md"
license = "Apache-2.0"
Expand All @@ -24,6 +24,9 @@ Changelog = "https://github.com/dedalus-labs/dedalus-python/blob/main/CHANGELOG.
[project.optional-dependencies]
aiohttp = ["aiohttp", "httpx_aiohttp>=0.1.9"]

[dependency-groups]
dev = ["pytest>=8.3.4"]

[build-system]
requires = ["hatchling>=1.18.0"]
build-backend = "hatchling.build"
Expand All @@ -33,3 +36,6 @@ packages = ["src/dedalus_sdk"]

[tool.ruff]
line-length = 120

[tool.pytest.ini_options]
testpaths = ["tests"]
Loading
Loading