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
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.0.4"
".": "0.1.0"
}
8 changes: 4 additions & 4 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 27
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/dedalus-labs%2Fdedalus-6a258bad8212a32bd01b1908ab115e08736d156d6907697a7e556b1809383790.yml
openapi_spec_hash: d80976534189646de029c562bb3ca9a1
config_hash: 795e855c41188604a3e270623e39c126
configured_endpoints: 29
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/dedalus-labs%2Fdedalus-018f649c40452f64a7454d2841a410297ef931793d4f6dbfebab541b060a2b21.yml
openapi_spec_hash: 7fd462f39c9dcf835904c06fea51ef46
config_hash: 89f7a7d317d1c89fd73ebaf74c5918cf
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 0.1.0 (2026-04-02)

Full Changelog: [v0.0.4...v0.1.0](https://github.com/dedalus-labs/dedalus-python/compare/v0.0.4...v0.1.0)

### Features

* **api:** add sleep & wake methods ([e9709ab](https://github.com/dedalus-labs/dedalus-python/commit/e9709abd85042a51ca1fab6bc4270e3b0ddbe602))

## 0.0.4 (2026-04-01)

Full Changelog: [v0.0.3...v0.0.4](https://github.com/dedalus-labs/dedalus-python/compare/v0.0.3...v0.0.4)
Expand Down
2 changes: 2 additions & 0 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ Methods:
- <code title="patch /v1/machines/{machine_id}">client.machines.<a href="./src/dedalus_sdk/resources/machines/machines.py">update</a>(\*, machine_id, \*\*<a href="src/dedalus_sdk/types/machine_update_params.py">params</a>) -> <a href="./src/dedalus_sdk/types/machine.py">Machine</a></code>
- <code title="get /v1/machines">client.machines.<a href="./src/dedalus_sdk/resources/machines/machines.py">list</a>(\*\*<a href="src/dedalus_sdk/types/machine_list_params.py">params</a>) -> <a href="./src/dedalus_sdk/types/machine_list_item.py">SyncCursorPage[MachineListItem]</a></code>
- <code title="delete /v1/machines/{machine_id}">client.machines.<a href="./src/dedalus_sdk/resources/machines/machines.py">delete</a>(\*, machine_id) -> <a href="./src/dedalus_sdk/types/machine.py">Machine</a></code>
- <code title="post /v1/machines/{machine_id}/sleep">client.machines.<a href="./src/dedalus_sdk/resources/machines/machines.py">sleep</a>(\*, machine_id) -> <a href="./src/dedalus_sdk/types/machine.py">Machine</a></code>
- <code title="post /v1/machines/{machine_id}/wake">client.machines.<a href="./src/dedalus_sdk/resources/machines/machines.py">wake</a>(\*, machine_id) -> <a href="./src/dedalus_sdk/types/machine.py">Machine</a></code>
- <code title="get /v1/machines/{machine_id}/status/stream">client.machines.<a href="./src/dedalus_sdk/resources/machines/machines.py">watch</a>(\*, machine_id) -> <a href="./src/dedalus_sdk/types/machine.py">Machine</a></code>

## Artifacts
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 = "dedalus-sdk"
version = "0.0.4"
version = "0.1.0"
description = "The official Python library for the Dedalus API"
dynamic = ["readme"]
license = "MIT"
Expand Down
2 changes: 1 addition & 1 deletion src/dedalus_sdk/_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__ = "dedalus_sdk"
__version__ = "0.0.4" # x-release-please-version
__version__ = "0.1.0" # x-release-please-version
192 changes: 192 additions & 0 deletions src/dedalus_sdk/resources/machines/machines.py
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,90 @@ def delete(
cast_to=Machine,
)

def sleep(
self,
*,
machine_id: str,
if_match: str,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
idempotency_key: str | None = None,
) -> Machine:
"""
Sleep a running machine

Args:
extra_headers: Send extra headers

extra_query: Add additional query parameters to the request

extra_body: Add additional JSON properties to the request

timeout: Override the client-level default timeout for this request, in seconds

idempotency_key: Specify a custom idempotency key for this request
"""
if not machine_id:
raise ValueError(f"Expected a non-empty value for `machine_id` but received {machine_id!r}")
extra_headers = {"If-Match": if_match, **(extra_headers or {})}
return self._post(
path_template("/v1/machines/{machine_id}/sleep", machine_id=machine_id),
options=make_request_options(
extra_headers=extra_headers,
extra_query=extra_query,
extra_body=extra_body,
timeout=timeout,
idempotency_key=idempotency_key,
),
cast_to=Machine,
)

def wake(
self,
*,
machine_id: str,
if_match: str,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
idempotency_key: str | None = None,
) -> Machine:
"""
Wake a sleeping machine

Args:
extra_headers: Send extra headers

extra_query: Add additional query parameters to the request

extra_body: Add additional JSON properties to the request

timeout: Override the client-level default timeout for this request, in seconds

idempotency_key: Specify a custom idempotency key for this request
"""
if not machine_id:
raise ValueError(f"Expected a non-empty value for `machine_id` but received {machine_id!r}")
extra_headers = {"If-Match": if_match, **(extra_headers or {})}
return self._post(
path_template("/v1/machines/{machine_id}/wake", machine_id=machine_id),
options=make_request_options(
extra_headers=extra_headers,
extra_query=extra_query,
extra_body=extra_body,
timeout=timeout,
idempotency_key=idempotency_key,
),
cast_to=Machine,
)

def watch(
self,
*,
Expand Down Expand Up @@ -648,6 +732,90 @@ async def delete(
cast_to=Machine,
)

async def sleep(
self,
*,
machine_id: str,
if_match: str,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
idempotency_key: str | None = None,
) -> Machine:
"""
Sleep a running machine

Args:
extra_headers: Send extra headers

extra_query: Add additional query parameters to the request

extra_body: Add additional JSON properties to the request

timeout: Override the client-level default timeout for this request, in seconds

idempotency_key: Specify a custom idempotency key for this request
"""
if not machine_id:
raise ValueError(f"Expected a non-empty value for `machine_id` but received {machine_id!r}")
extra_headers = {"If-Match": if_match, **(extra_headers or {})}
return await self._post(
path_template("/v1/machines/{machine_id}/sleep", machine_id=machine_id),
options=make_request_options(
extra_headers=extra_headers,
extra_query=extra_query,
extra_body=extra_body,
timeout=timeout,
idempotency_key=idempotency_key,
),
cast_to=Machine,
)

async def wake(
self,
*,
machine_id: str,
if_match: str,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
idempotency_key: str | None = None,
) -> Machine:
"""
Wake a sleeping machine

Args:
extra_headers: Send extra headers

extra_query: Add additional query parameters to the request

extra_body: Add additional JSON properties to the request

timeout: Override the client-level default timeout for this request, in seconds

idempotency_key: Specify a custom idempotency key for this request
"""
if not machine_id:
raise ValueError(f"Expected a non-empty value for `machine_id` but received {machine_id!r}")
extra_headers = {"If-Match": if_match, **(extra_headers or {})}
return await self._post(
path_template("/v1/machines/{machine_id}/wake", machine_id=machine_id),
options=make_request_options(
extra_headers=extra_headers,
extra_query=extra_query,
extra_body=extra_body,
timeout=timeout,
idempotency_key=idempotency_key,
),
cast_to=Machine,
)

async def watch(
self,
*,
Expand Down Expand Up @@ -709,6 +877,12 @@ def __init__(self, machines: MachinesResource) -> None:
self.delete = to_raw_response_wrapper(
machines.delete,
)
self.sleep = to_raw_response_wrapper(
machines.sleep,
)
self.wake = to_raw_response_wrapper(
machines.wake,
)
self.watch = to_raw_response_wrapper(
machines.watch,
)
Expand Down Expand Up @@ -753,6 +927,12 @@ def __init__(self, machines: AsyncMachinesResource) -> None:
self.delete = async_to_raw_response_wrapper(
machines.delete,
)
self.sleep = async_to_raw_response_wrapper(
machines.sleep,
)
self.wake = async_to_raw_response_wrapper(
machines.wake,
)
self.watch = async_to_raw_response_wrapper(
machines.watch,
)
Expand Down Expand Up @@ -797,6 +977,12 @@ def __init__(self, machines: MachinesResource) -> None:
self.delete = to_streamed_response_wrapper(
machines.delete,
)
self.sleep = to_streamed_response_wrapper(
machines.sleep,
)
self.wake = to_streamed_response_wrapper(
machines.wake,
)
self.watch = to_streamed_response_wrapper(
machines.watch,
)
Expand Down Expand Up @@ -841,6 +1027,12 @@ def __init__(self, machines: AsyncMachinesResource) -> None:
self.delete = async_to_streamed_response_wrapper(
machines.delete,
)
self.sleep = async_to_streamed_response_wrapper(
machines.sleep,
)
self.wake = async_to_streamed_response_wrapper(
machines.wake,
)
self.watch = async_to_streamed_response_wrapper(
machines.watch,
)
Expand Down
Loading
Loading