From c5663e6e8c942d95b6a8fb5a50ee43e1dedf8cdf Mon Sep 17 00:00:00 2001 From: Siddarth Chalasani Date: Wed, 19 Nov 2025 16:54:40 -0800 Subject: [PATCH 1/7] reorganize structure + add relevant base api types --- docs/api/index.rst | 135 ---------------------- docs/index.rst | 4 +- docs/sdk/index.rst | 106 +++++++++++++++++ docs/{api/typedicts.rst => sdk/types.rst} | 42 ++++--- 4 files changed, 134 insertions(+), 153 deletions(-) delete mode 100644 docs/api/index.rst create mode 100644 docs/sdk/index.rst rename docs/{api/typedicts.rst => sdk/types.rst} (74%) diff --git a/docs/api/index.rst b/docs/api/index.rst deleted file mode 100644 index f746a47d8..000000000 --- a/docs/api/index.rst +++ /dev/null @@ -1,135 +0,0 @@ -API Reference -============= - -This section contains detailed API documentation for the Runloop SDK. - -.. toctree:: - :maxdepth: 2 - - typedicts - -SDK Classes ------------ - -Synchronous SDK -~~~~~~~~~~~~~~~ - -.. autoclass:: runloop_api_client.RunloopSDK - :members: - :undoc-members: - :show-inheritance: - -.. autoclass:: runloop_api_client.sdk.sync.DevboxOps - :members: - :undoc-members: - :show-inheritance: - -.. autoclass:: runloop_api_client.sdk.sync.BlueprintOps - :members: - :undoc-members: - :show-inheritance: - -.. autoclass:: runloop_api_client.sdk.sync.SnapshotOps - :members: - :undoc-members: - :show-inheritance: - -.. autoclass:: runloop_api_client.sdk.sync.StorageObjectOps - :members: - :undoc-members: - :show-inheritance: - -Resource Classes -~~~~~~~~~~~~~~~~ - -.. autoclass:: runloop_api_client.sdk.devbox.Devbox - :members: - :undoc-members: - :show-inheritance: - -.. autoclass:: runloop_api_client.sdk.blueprint.Blueprint - :members: - :undoc-members: - :show-inheritance: - -.. autoclass:: runloop_api_client.sdk.snapshot.Snapshot - :members: - :undoc-members: - :show-inheritance: - -.. autoclass:: runloop_api_client.sdk.storage_object.StorageObject - :members: - :undoc-members: - :show-inheritance: - -.. autoclass:: runloop_api_client.sdk.execution.Execution - :members: - :undoc-members: - :show-inheritance: - -.. autoclass:: runloop_api_client.sdk.execution_result.ExecutionResult - :members: - :undoc-members: - :show-inheritance: - -Asynchronous SDK -~~~~~~~~~~~~~~~~ - -.. autoclass:: runloop_api_client.AsyncRunloopSDK - :members: - :undoc-members: - :show-inheritance: - -.. autoclass:: runloop_api_client.sdk.async_.AsyncDevboxOps - :members: - :undoc-members: - :show-inheritance: - -.. autoclass:: runloop_api_client.sdk.async_.AsyncBlueprintOps - :members: - :undoc-members: - :show-inheritance: - -.. autoclass:: runloop_api_client.sdk.async_.AsyncSnapshotOps - :members: - :undoc-members: - :show-inheritance: - -.. autoclass:: runloop_api_client.sdk.async_.AsyncStorageObjectOps - :members: - :undoc-members: - :show-inheritance: - -Asynchronous Resource Classes -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -.. autoclass:: runloop_api_client.sdk.async_devbox.AsyncDevbox - :members: - :undoc-members: - :show-inheritance: - -.. autoclass:: runloop_api_client.sdk.async_blueprint.AsyncBlueprint - :members: - :undoc-members: - :show-inheritance: - -.. autoclass:: runloop_api_client.sdk.async_snapshot.AsyncSnapshot - :members: - :undoc-members: - :show-inheritance: - -.. autoclass:: runloop_api_client.sdk.async_storage_object.AsyncStorageObject - :members: - :undoc-members: - :show-inheritance: - -.. autoclass:: runloop_api_client.sdk.async_execution.AsyncExecution - :members: - :undoc-members: - :show-inheritance: - -.. autoclass:: runloop_api_client.sdk.async_execution_result.AsyncExecutionResult - :members: - :undoc-members: - :show-inheritance: - diff --git a/docs/index.rst b/docs/index.rst index d082e4e74..f4b946b4e 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -9,7 +9,7 @@ and asynchronous variants to match your runtime requirements. :maxdepth: 2 :caption: Contents: - api/index + sdk/index Installation ------------ @@ -42,6 +42,7 @@ Asynchronous Example .. code-block:: python + import asyncio from runloop_api_client import AsyncRunloopSDK async def main(): @@ -51,7 +52,6 @@ Asynchronous Example result = await devbox.cmd.exec(command="echo 'Hello from Runloop!'") print(await result.stdout()) - import asyncio asyncio.run(main()) Indices and tables diff --git a/docs/sdk/index.rst b/docs/sdk/index.rst new file mode 100644 index 000000000..4e6e264e8 --- /dev/null +++ b/docs/sdk/index.rst @@ -0,0 +1,106 @@ +SDK Reference +============= + +This section contains detailed documentation for the Runloop SDK. + +.. toctree:: + :maxdepth: 2 + + types + +Synchronous SDK +--------------- + +Core Module +~~~~~~~~~~~ + +The core synchronous SDK module provides the main entry point and operation classes. + +.. automodule:: runloop_api_client.sdk.sync + :members: + :undoc-members: + :show-inheritance: + +Resource Modules +~~~~~~~~~~~~~~~~ + +Synchronous resource classes for working with devboxes, blueprints, snapshots, and more. + +.. automodule:: runloop_api_client.sdk.devbox + :members: + :undoc-members: + :show-inheritance: + +.. automodule:: runloop_api_client.sdk.blueprint + :members: + :undoc-members: + :show-inheritance: + +.. automodule:: runloop_api_client.sdk.snapshot + :members: + :undoc-members: + :show-inheritance: + +.. automodule:: runloop_api_client.sdk.storage_object + :members: + :undoc-members: + :show-inheritance: + +.. automodule:: runloop_api_client.sdk.execution + :members: + :undoc-members: + :show-inheritance: + +.. automodule:: runloop_api_client.sdk.execution_result + :members: + :undoc-members: + :show-inheritance: + +Asynchronous SDK +---------------- + +Core Module +~~~~~~~~~~~ + +The core asynchronous SDK module provides async operation classes. + +.. automodule:: runloop_api_client.sdk.async_ + :members: + :undoc-members: + :show-inheritance: + +Resource Modules +~~~~~~~~~~~~~~~~ + +Asynchronous resource classes for working with devboxes, blueprints, snapshots, and more. + +.. automodule:: runloop_api_client.sdk.async_devbox + :members: + :undoc-members: + :show-inheritance: + +.. automodule:: runloop_api_client.sdk.async_blueprint + :members: + :undoc-members: + :show-inheritance: + +.. automodule:: runloop_api_client.sdk.async_snapshot + :members: + :undoc-members: + :show-inheritance: + +.. automodule:: runloop_api_client.sdk.async_storage_object + :members: + :undoc-members: + :show-inheritance: + +.. automodule:: runloop_api_client.sdk.async_execution + :members: + :undoc-members: + :show-inheritance: + +.. automodule:: runloop_api_client.sdk.async_execution_result + :members: + :undoc-members: + :show-inheritance: + diff --git a/docs/api/typedicts.rst b/docs/sdk/types.rst similarity index 74% rename from docs/api/typedicts.rst rename to docs/sdk/types.rst index 8a15d4304..27a26ddbb 100644 --- a/docs/api/typedicts.rst +++ b/docs/sdk/types.rst @@ -1,17 +1,12 @@ -TypedDict Reference -=================== +Type Reference +============== -This page documents all TypedDict parameter types used throughout the SDK. -These typed dictionaries define the structure of parameters passed to SDK methods. - -SDK TypedDicts --------------- - -These are the primary TypedDict classes used in SDK methods, combining multiple -parameter types and options. +This page documents all TypeDict parameter types used throughout the SDK. Core Request Options -~~~~~~~~~~~~~~~~~~~~ +-------------------- + +These TypeDicts define options for streaming, timeouts, polling, and other request configuration. .. autotypeddict:: runloop_api_client.sdk._types.ExecuteStreamingCallbacks @@ -24,16 +19,27 @@ Core Request Options .. autotypeddict:: runloop_api_client.sdk._types.LongPollingRequestOptions Devbox Parameters -~~~~~~~~~~~~~~~~~ +----------------- + +These TypeDicts define parameters for devbox creation, execution, file operations, network tunnels, and snapshots. + +Creation Parameters +~~~~~~~~~~~~~~~~~~~ .. autotypeddict:: runloop_api_client.sdk._types.SDKDevboxCreateParams .. autotypeddict:: runloop_api_client.sdk._types.SDKDevboxExtraCreateParams +Execution Parameters +~~~~~~~~~~~~~~~~~~~~ + .. autotypeddict:: runloop_api_client.sdk._types.SDKDevboxExecuteParams .. autotypeddict:: runloop_api_client.sdk._types.SDKDevboxExecuteAsyncParams +Listing Parameters +~~~~~~~~~~~~~~~~~~ + .. autotypeddict:: runloop_api_client.sdk._types.SDKDevboxListParams File Operation Parameters @@ -47,8 +53,8 @@ File Operation Parameters .. autotypeddict:: runloop_api_client.sdk._types.SDKDevboxUploadFileParams -Network Operation Parameters -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Network Tunnel Parameters +~~~~~~~~~~~~~~~~~~~~~~~~~~ .. autotypeddict:: runloop_api_client.sdk._types.SDKDevboxCreateTunnelParams @@ -66,14 +72,18 @@ Snapshot Parameters .. autotypeddict:: runloop_api_client.sdk._types.SDKDiskSnapshotUpdateParams Blueprint Parameters -~~~~~~~~~~~~~~~~~~~~ +-------------------- + +These TypeDicts define parameters for blueprint creation and listing. .. autotypeddict:: runloop_api_client.sdk._types.SDKBlueprintCreateParams .. autotypeddict:: runloop_api_client.sdk._types.SDKBlueprintListParams Storage Object Parameters -~~~~~~~~~~~~~~~~~~~~~~~~~ +------------------------- + +These TypeDicts define parameters for storage object creation, listing, and downloading. .. autotypeddict:: runloop_api_client.sdk._types.SDKObjectCreateParams From a62491d321b2ccae353b0b030366e6f18460b4bd Mon Sep 17 00:00:00 2001 From: Siddarth Chalasani Date: Wed, 19 Nov 2025 17:08:01 -0800 Subject: [PATCH 2/7] don't document inheritance and undocumented members, and separate sync and async documentation into separate pages --- docs/conf.py | 2 - docs/sdk/async.rst | 29 +++++++++++++ docs/sdk/index.rst | 102 +++------------------------------------------ docs/sdk/sync.rst | 29 +++++++++++++ 4 files changed, 63 insertions(+), 99 deletions(-) create mode 100644 docs/sdk/async.rst create mode 100644 docs/sdk/sync.rst diff --git a/docs/conf.py b/docs/conf.py index 8b685cd7a..185736117 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -50,8 +50,6 @@ # Autodoc settings autodoc_default_options = { "members": None, - "undoc-members": None, - "show-inheritance": None, } autodoc_typehints = "description" diff --git a/docs/sdk/async.rst b/docs/sdk/async.rst new file mode 100644 index 000000000..4ac27259d --- /dev/null +++ b/docs/sdk/async.rst @@ -0,0 +1,29 @@ +Asynchronous SDK +================ + +The asynchronous SDK provides a non-blocking interface for managing devboxes, blueprints, snapshots, and storage objects. Use this variant when working with async/await Python code. + +Core Module +----------- + +The core asynchronous SDK module provides async operation classes. + +.. automodule:: runloop_api_client.sdk.async_ + +Resource Modules +---------------- + +Asynchronous resource classes for working with devboxes, blueprints, snapshots, and more. + +.. automodule:: runloop_api_client.sdk.async_devbox + +.. automodule:: runloop_api_client.sdk.async_blueprint + +.. automodule:: runloop_api_client.sdk.async_snapshot + +.. automodule:: runloop_api_client.sdk.async_storage_object + +.. automodule:: runloop_api_client.sdk.async_execution + +.. automodule:: runloop_api_client.sdk.async_execution_result + diff --git a/docs/sdk/index.rst b/docs/sdk/index.rst index 4e6e264e8..14dc7a80d 100644 --- a/docs/sdk/index.rst +++ b/docs/sdk/index.rst @@ -3,104 +3,12 @@ SDK Reference This section contains detailed documentation for the Runloop SDK. +The Runloop SDK provides both synchronous and asynchronous interfaces for managing devboxes, blueprints, snapshots, and storage objects. Choose the variant that matches your application's runtime requirements. + .. toctree:: :maxdepth: 2 + :caption: SDK Documentation + sync + async types - -Synchronous SDK ---------------- - -Core Module -~~~~~~~~~~~ - -The core synchronous SDK module provides the main entry point and operation classes. - -.. automodule:: runloop_api_client.sdk.sync - :members: - :undoc-members: - :show-inheritance: - -Resource Modules -~~~~~~~~~~~~~~~~ - -Synchronous resource classes for working with devboxes, blueprints, snapshots, and more. - -.. automodule:: runloop_api_client.sdk.devbox - :members: - :undoc-members: - :show-inheritance: - -.. automodule:: runloop_api_client.sdk.blueprint - :members: - :undoc-members: - :show-inheritance: - -.. automodule:: runloop_api_client.sdk.snapshot - :members: - :undoc-members: - :show-inheritance: - -.. automodule:: runloop_api_client.sdk.storage_object - :members: - :undoc-members: - :show-inheritance: - -.. automodule:: runloop_api_client.sdk.execution - :members: - :undoc-members: - :show-inheritance: - -.. automodule:: runloop_api_client.sdk.execution_result - :members: - :undoc-members: - :show-inheritance: - -Asynchronous SDK ----------------- - -Core Module -~~~~~~~~~~~ - -The core asynchronous SDK module provides async operation classes. - -.. automodule:: runloop_api_client.sdk.async_ - :members: - :undoc-members: - :show-inheritance: - -Resource Modules -~~~~~~~~~~~~~~~~ - -Asynchronous resource classes for working with devboxes, blueprints, snapshots, and more. - -.. automodule:: runloop_api_client.sdk.async_devbox - :members: - :undoc-members: - :show-inheritance: - -.. automodule:: runloop_api_client.sdk.async_blueprint - :members: - :undoc-members: - :show-inheritance: - -.. automodule:: runloop_api_client.sdk.async_snapshot - :members: - :undoc-members: - :show-inheritance: - -.. automodule:: runloop_api_client.sdk.async_storage_object - :members: - :undoc-members: - :show-inheritance: - -.. automodule:: runloop_api_client.sdk.async_execution - :members: - :undoc-members: - :show-inheritance: - -.. automodule:: runloop_api_client.sdk.async_execution_result - :members: - :undoc-members: - :show-inheritance: - diff --git a/docs/sdk/sync.rst b/docs/sdk/sync.rst new file mode 100644 index 000000000..88d9c0eb5 --- /dev/null +++ b/docs/sdk/sync.rst @@ -0,0 +1,29 @@ +Synchronous SDK +=============== + +The synchronous SDK provides a blocking interface for managing devboxes, blueprints, snapshots, and storage objects. Use this variant when working in synchronous Python code. + +Core Module +----------- + +The core synchronous SDK module provides the main entry point and operation classes. + +.. automodule:: runloop_api_client.sdk.sync + +Resource Modules +---------------- + +Synchronous resource classes for working with devboxes, blueprints, snapshots, and more. + +.. automodule:: runloop_api_client.sdk.devbox + +.. automodule:: runloop_api_client.sdk.blueprint + +.. automodule:: runloop_api_client.sdk.snapshot + +.. automodule:: runloop_api_client.sdk.storage_object + +.. automodule:: runloop_api_client.sdk.execution + +.. automodule:: runloop_api_client.sdk.execution_result + From 6f8126f55d19038d237f9b49fa92fd9beb465c62 Mon Sep 17 00:00:00 2001 From: Siddarth Chalasani Date: Wed, 19 Nov 2025 18:47:21 -0800 Subject: [PATCH 3/7] clean up class docstrings --- docs/conf.py | 9 --------- src/runloop_api_client/sdk/async_.py | 16 ++++++++++------ src/runloop_api_client/sdk/async_devbox.py | 6 ------ src/runloop_api_client/sdk/async_execution.py | 4 ---- src/runloop_api_client/sdk/devbox.py | 10 +++------- src/runloop_api_client/sdk/execution.py | 4 ---- src/runloop_api_client/sdk/sync.py | 16 ++++++++++------ 7 files changed, 23 insertions(+), 42 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 185736117..80794e562 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -15,7 +15,6 @@ project = "Runloop Python SDK" copyright = "2025, Runloop" author = "Runloop" -release = "0.68.0" # -- General configuration --------------------------------------------------- # https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration @@ -40,13 +39,6 @@ # -- Extension configuration ------------------------------------------------- -# Napoleon settings -napoleon_google_docstring = False -napoleon_numpy_docstring = False -napoleon_use_param = True -napoleon_use_rtype = True -napoleon_use_ivar = True - # Autodoc settings autodoc_default_options = { "members": None, @@ -58,5 +50,4 @@ # Intersphinx mapping intersphinx_mapping = { "python": ("https://docs.python.org/3", None), - "httpx": ("https://www.python-httpx.org", None), } diff --git a/src/runloop_api_client/sdk/async_.py b/src/runloop_api_client/sdk/async_.py index 6f62c278b..df4c8ac0c 100644 --- a/src/runloop_api_client/sdk/async_.py +++ b/src/runloop_api_client/sdk/async_.py @@ -422,12 +422,16 @@ class AsyncRunloopSDK: blueprints, snapshots, and storage objects. Exposes the generated async REST client via the ``api`` attribute for advanced use cases. - Attributes: - api: Direct access to the generated async REST API client. - devbox: High-level async interface for devbox management. - blueprint: High-level async interface for blueprint management. - snapshot: High-level async interface for snapshot management. - storage_object: High-level async interface for storage object management. + :ivar api: Direct access to the generated async REST API client + :vartype api: AsyncRunloop + :ivar devbox: High-level async interface for devbox management + :vartype devbox: AsyncDevboxOps + :ivar blueprint: High-level async interface for blueprint management + :vartype blueprint: AsyncBlueprintOps + :ivar snapshot: High-level async interface for snapshot management + :vartype snapshot: AsyncSnapshotOps + :ivar storage_object: High-level async interface for storage object management + :vartype storage_object: AsyncStorageObjectOps Example: >>> runloop = AsyncRunloopSDK() # Uses RUNLOOP_API_KEY env var diff --git a/src/runloop_api_client/sdk/async_devbox.py b/src/runloop_api_client/sdk/async_devbox.py index 82f61e6d4..cf553b021 100644 --- a/src/runloop_api_client/sdk/async_devbox.py +++ b/src/runloop_api_client/sdk/async_devbox.py @@ -60,12 +60,6 @@ class AsyncDevbox: ... result = await devbox.cmd.exec(command="echo 'hello'") ... print(await result.stdout()) # Devbox is automatically shut down on exit - - Attributes: - id: The devbox identifier. - cmd: Command execution interface (exec, exec_async). - file: File operations interface (read, write, upload, download). - net: Network operations interface (SSH keys, tunnels). """ def __init__(self, client: AsyncRunloop, devbox_id: str) -> None: diff --git a/src/runloop_api_client/sdk/async_execution.py b/src/runloop_api_client/sdk/async_execution.py index 7158ba03d..cef1b29d9 100644 --- a/src/runloop_api_client/sdk/async_execution.py +++ b/src/runloop_api_client/sdk/async_execution.py @@ -42,10 +42,6 @@ class AsyncExecution: Provides coroutines to poll execution state, wait for completion, and terminate the running process. Created by ``await devbox.cmd.exec_async()``. - Attributes: - execution_id: The unique execution identifier. - devbox_id: The devbox where the command is executing. - Example: >>> execution = await devbox.cmd.exec_async(command="python train.py") >>> state = await execution.get_state() diff --git a/src/runloop_api_client/sdk/devbox.py b/src/runloop_api_client/sdk/devbox.py index eda2274fb..7f1f2fa63 100644 --- a/src/runloop_api_client/sdk/devbox.py +++ b/src/runloop_api_client/sdk/devbox.py @@ -52,17 +52,13 @@ class Devbox: This class provides a Pythonic, object-oriented API for interacting with devboxes, including command execution, file operations, networking, and lifecycle management. - The Devbox class supports context manager protocol for automatic cleanup: + The Devbox class supports context manager protocol for automatic cleanup. + + Example: >>> with sdk.devbox.create(name="my-devbox") as devbox: ... result = devbox.cmd.exec("echo 'hello'") ... print(result.stdout()) # Devbox is automatically shutdown on exit - - Attributes: - id: The devbox identifier. - cmd: Command execution interface (exec, exec_async). - file: File operations interface (read, write, upload, download). - net: Network operations interface (SSH keys, tunnels). """ def __init__(self, client: Runloop, devbox_id: str) -> None: diff --git a/src/runloop_api_client/sdk/execution.py b/src/runloop_api_client/sdk/execution.py index 55eb73c67..3b59fd309 100644 --- a/src/runloop_api_client/sdk/execution.py +++ b/src/runloop_api_client/sdk/execution.py @@ -41,10 +41,6 @@ class Execution: Provides methods to poll execution state, wait for completion, and terminate the running process. Created by ``devbox.cmd.exec_async()``. - Attributes: - execution_id: The unique execution identifier. - devbox_id: The devbox where the command is executing. - Example: >>> execution = devbox.cmd.exec_async(command="python train.py") >>> state = execution.get_state() diff --git a/src/runloop_api_client/sdk/sync.py b/src/runloop_api_client/sdk/sync.py index 5d82b5022..3a931d1a5 100644 --- a/src/runloop_api_client/sdk/sync.py +++ b/src/runloop_api_client/sdk/sync.py @@ -422,12 +422,16 @@ class RunloopSDK: snapshots, and storage objects. Exposes the generated REST client via the ``api`` attribute for advanced use cases. - Attributes: - api: Direct access to the generated REST API client. - devbox: High-level interface for devbox management. - blueprint: High-level interface for blueprint management. - snapshot: High-level interface for snapshot management. - storage_object: High-level interface for storage object management. + :ivar api: Direct access to the generated REST API client + :vartype api: Runloop + :ivar devbox: High-level interface for devbox management + :vartype devbox: DevboxOps + :ivar blueprint: High-level interface for blueprint management + :vartype blueprint: BlueprintOps + :ivar snapshot: High-level interface for snapshot management + :vartype snapshot: SnapshotOps + :ivar storage_object: High-level interface for storage object management + :vartype storage_object: StorageObjectOps Example: >>> runloop = RunloopSDK() # Uses RUNLOOP_API_KEY env var From 5139eca2cee19d1c12ff7285abcb9059671a24a6 Mon Sep 17 00:00:00 2001 From: Siddarth Chalasani Date: Wed, 19 Nov 2025 18:47:38 -0800 Subject: [PATCH 4/7] fix example type --- docs/index.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/index.rst b/docs/index.rst index f4b946b4e..30e7043bb 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -48,7 +48,7 @@ Asynchronous Example async def main(): runloop = AsyncRunloopSDK() - async with runloop.devbox.create(name="my-devbox") as devbox: + async with await runloop.devbox.create(name="my-devbox") as devbox: result = await devbox.cmd.exec(command="echo 'Hello from Runloop!'") print(await result.stdout()) From 704f053b5f1b9634d65b3fdcc1945e07d59abb7a Mon Sep 17 00:00:00 2001 From: Siddarth Chalasani Date: Wed, 19 Nov 2025 18:47:59 -0800 Subject: [PATCH 5/7] restructuring to give each resource a separate page --- docs/sdk/async/blueprint.rst | 8 ++++++++ docs/sdk/async/devbox.rst | 8 ++++++++ docs/sdk/async/execution.rst | 8 ++++++++ docs/sdk/async/execution_result.rst | 8 ++++++++ docs/sdk/{async.rst => async/index.rst} | 20 ++++++++++---------- docs/sdk/async/snapshot.rst | 8 ++++++++ docs/sdk/async/storage_object.rst | 8 ++++++++ docs/sdk/index.rst | 4 ++-- docs/sdk/sync/blueprint.rst | 8 ++++++++ docs/sdk/sync/devbox.rst | 8 ++++++++ docs/sdk/sync/execution.rst | 8 ++++++++ docs/sdk/sync/execution_result.rst | 8 ++++++++ docs/sdk/{sync.rst => sync/index.rst} | 20 ++++++++++---------- docs/sdk/sync/snapshot.rst | 8 ++++++++ docs/sdk/sync/storage_object.rst | 8 ++++++++ 15 files changed, 118 insertions(+), 22 deletions(-) create mode 100644 docs/sdk/async/blueprint.rst create mode 100644 docs/sdk/async/devbox.rst create mode 100644 docs/sdk/async/execution.rst create mode 100644 docs/sdk/async/execution_result.rst rename docs/sdk/{async.rst => async/index.rst} (58%) create mode 100644 docs/sdk/async/snapshot.rst create mode 100644 docs/sdk/async/storage_object.rst create mode 100644 docs/sdk/sync/blueprint.rst create mode 100644 docs/sdk/sync/devbox.rst create mode 100644 docs/sdk/sync/execution.rst create mode 100644 docs/sdk/sync/execution_result.rst rename docs/sdk/{sync.rst => sync/index.rst} (61%) create mode 100644 docs/sdk/sync/snapshot.rst create mode 100644 docs/sdk/sync/storage_object.rst diff --git a/docs/sdk/async/blueprint.rst b/docs/sdk/async/blueprint.rst new file mode 100644 index 000000000..c28afd382 --- /dev/null +++ b/docs/sdk/async/blueprint.rst @@ -0,0 +1,8 @@ +Blueprint +========= + +The ``AsyncBlueprint`` class provides asynchronous methods for managing devbox blueprints. + +.. automodule:: runloop_api_client.sdk.async_blueprint + :members: + diff --git a/docs/sdk/async/devbox.rst b/docs/sdk/async/devbox.rst new file mode 100644 index 000000000..ef04443d7 --- /dev/null +++ b/docs/sdk/async/devbox.rst @@ -0,0 +1,8 @@ +Devbox +====== + +The ``AsyncDevbox`` class provides asynchronous methods for managing and interacting with a devbox instance. + +.. automodule:: runloop_api_client.sdk.async_devbox + :members: + diff --git a/docs/sdk/async/execution.rst b/docs/sdk/async/execution.rst new file mode 100644 index 000000000..988688094 --- /dev/null +++ b/docs/sdk/async/execution.rst @@ -0,0 +1,8 @@ +Execution +========= + +The ``AsyncExecution`` class represents an asynchronous command execution in progress. + +.. automodule:: runloop_api_client.sdk.async_execution + :members: + diff --git a/docs/sdk/async/execution_result.rst b/docs/sdk/async/execution_result.rst new file mode 100644 index 000000000..e2f6f3ad1 --- /dev/null +++ b/docs/sdk/async/execution_result.rst @@ -0,0 +1,8 @@ +Execution Result +================ + +The ``AsyncExecutionResult`` class represents the result of a completed command execution. + +.. automodule:: runloop_api_client.sdk.async_execution_result + :members: + diff --git a/docs/sdk/async.rst b/docs/sdk/async/index.rst similarity index 58% rename from docs/sdk/async.rst rename to docs/sdk/async/index.rst index 4ac27259d..1d92ea76f 100644 --- a/docs/sdk/async.rst +++ b/docs/sdk/async/index.rst @@ -8,6 +8,8 @@ Core Module The core asynchronous SDK module provides async operation classes. +.. autoclass:: runloop_api_client.sdk.async_.AsyncRunloopSDK + .. automodule:: runloop_api_client.sdk.async_ Resource Modules @@ -15,15 +17,13 @@ Resource Modules Asynchronous resource classes for working with devboxes, blueprints, snapshots, and more. -.. automodule:: runloop_api_client.sdk.async_devbox - -.. automodule:: runloop_api_client.sdk.async_blueprint - -.. automodule:: runloop_api_client.sdk.async_snapshot - -.. automodule:: runloop_api_client.sdk.async_storage_object - -.. automodule:: runloop_api_client.sdk.async_execution +.. toctree:: + :maxdepth: 1 -.. automodule:: runloop_api_client.sdk.async_execution_result + devbox + execution + execution_result + blueprint + snapshot + storage_object diff --git a/docs/sdk/async/snapshot.rst b/docs/sdk/async/snapshot.rst new file mode 100644 index 000000000..75826695a --- /dev/null +++ b/docs/sdk/async/snapshot.rst @@ -0,0 +1,8 @@ +Snapshot +======== + +The ``AsyncSnapshot`` class provides asynchronous methods for managing devbox snapshots. + +.. automodule:: runloop_api_client.sdk.async_snapshot + :members: + diff --git a/docs/sdk/async/storage_object.rst b/docs/sdk/async/storage_object.rst new file mode 100644 index 000000000..bc7f79b35 --- /dev/null +++ b/docs/sdk/async/storage_object.rst @@ -0,0 +1,8 @@ +Storage Object +============== + +The ``AsyncStorageObject`` class provides asynchronous methods for managing storage objects. + +.. automodule:: runloop_api_client.sdk.async_storage_object + :members: + diff --git a/docs/sdk/index.rst b/docs/sdk/index.rst index 14dc7a80d..0151a89d3 100644 --- a/docs/sdk/index.rst +++ b/docs/sdk/index.rst @@ -9,6 +9,6 @@ The Runloop SDK provides both synchronous and asynchronous interfaces for managi :maxdepth: 2 :caption: SDK Documentation - sync - async + sync/index + async/index types diff --git a/docs/sdk/sync/blueprint.rst b/docs/sdk/sync/blueprint.rst new file mode 100644 index 000000000..c7e250285 --- /dev/null +++ b/docs/sdk/sync/blueprint.rst @@ -0,0 +1,8 @@ +Blueprint +========= + +The ``Blueprint`` class provides synchronous methods for managing devbox blueprints. + +.. automodule:: runloop_api_client.sdk.blueprint + :members: + diff --git a/docs/sdk/sync/devbox.rst b/docs/sdk/sync/devbox.rst new file mode 100644 index 000000000..ca60c6993 --- /dev/null +++ b/docs/sdk/sync/devbox.rst @@ -0,0 +1,8 @@ +Devbox +====== + +The ``Devbox`` class provides synchronous methods for managing and interacting with a devbox instance. + +.. automodule:: runloop_api_client.sdk.devbox + :members: + diff --git a/docs/sdk/sync/execution.rst b/docs/sdk/sync/execution.rst new file mode 100644 index 000000000..8159eae1e --- /dev/null +++ b/docs/sdk/sync/execution.rst @@ -0,0 +1,8 @@ +Execution +========= + +The ``Execution`` class represents an asynchronous command execution in progress. + +.. automodule:: runloop_api_client.sdk.execution + :members: + diff --git a/docs/sdk/sync/execution_result.rst b/docs/sdk/sync/execution_result.rst new file mode 100644 index 000000000..92496683a --- /dev/null +++ b/docs/sdk/sync/execution_result.rst @@ -0,0 +1,8 @@ +Execution Result +================ + +The ``ExecutionResult`` class represents the result of a completed command execution. + +.. automodule:: runloop_api_client.sdk.execution_result + :members: + diff --git a/docs/sdk/sync.rst b/docs/sdk/sync/index.rst similarity index 61% rename from docs/sdk/sync.rst rename to docs/sdk/sync/index.rst index 88d9c0eb5..c77646f2a 100644 --- a/docs/sdk/sync.rst +++ b/docs/sdk/sync/index.rst @@ -8,6 +8,8 @@ Core Module The core synchronous SDK module provides the main entry point and operation classes. +.. autoclass:: runloop_api_client.sdk.sync.RunloopSDK + .. automodule:: runloop_api_client.sdk.sync Resource Modules @@ -15,15 +17,13 @@ Resource Modules Synchronous resource classes for working with devboxes, blueprints, snapshots, and more. -.. automodule:: runloop_api_client.sdk.devbox - -.. automodule:: runloop_api_client.sdk.blueprint - -.. automodule:: runloop_api_client.sdk.snapshot - -.. automodule:: runloop_api_client.sdk.storage_object - -.. automodule:: runloop_api_client.sdk.execution +.. toctree:: + :maxdepth: 1 -.. automodule:: runloop_api_client.sdk.execution_result + devbox + execution + execution_result + blueprint + snapshot + storage_object diff --git a/docs/sdk/sync/snapshot.rst b/docs/sdk/sync/snapshot.rst new file mode 100644 index 000000000..6b0bb358d --- /dev/null +++ b/docs/sdk/sync/snapshot.rst @@ -0,0 +1,8 @@ +Snapshot +======== + +The ``Snapshot`` class provides synchronous methods for managing devbox snapshots. + +.. automodule:: runloop_api_client.sdk.snapshot + :members: + diff --git a/docs/sdk/sync/storage_object.rst b/docs/sdk/sync/storage_object.rst new file mode 100644 index 000000000..97b4bb77d --- /dev/null +++ b/docs/sdk/sync/storage_object.rst @@ -0,0 +1,8 @@ +Storage Object +============== + +The ``StorageObject`` class provides synchronous methods for managing storage objects. + +.. automodule:: runloop_api_client.sdk.storage_object + :members: + From b45a9284e5f8cbe9500c03dcb05d5d03297a060a Mon Sep 17 00:00:00 2001 From: Siddarth Chalasani Date: Thu, 20 Nov 2025 14:40:37 -0800 Subject: [PATCH 6/7] renamed SDKDevboxExtraCreateParams to SDKDevboxCreateFromImageParams --- src/runloop_api_client/sdk/_types.py | 2 +- src/runloop_api_client/sdk/async_.py | 14 +++++++------- src/runloop_api_client/sdk/async_blueprint.py | 6 +++--- src/runloop_api_client/sdk/async_snapshot.py | 6 +++--- src/runloop_api_client/sdk/blueprint.py | 6 +++--- src/runloop_api_client/sdk/snapshot.py | 6 +++--- src/runloop_api_client/sdk/sync.py | 14 +++++++------- 7 files changed, 27 insertions(+), 27 deletions(-) diff --git a/src/runloop_api_client/sdk/_types.py b/src/runloop_api_client/sdk/_types.py index 72ede0da1..7ac404055 100644 --- a/src/runloop_api_client/sdk/_types.py +++ b/src/runloop_api_client/sdk/_types.py @@ -68,7 +68,7 @@ class SDKDevboxCreateParams(DevboxCreateParams, LongPollingRequestOptions): pass -class SDKDevboxExtraCreateParams(DevboxBaseCreateParams, LongPollingRequestOptions): +class SDKDevboxCreateFromImageParams(DevboxBaseCreateParams, LongPollingRequestOptions): pass diff --git a/src/runloop_api_client/sdk/async_.py b/src/runloop_api_client/sdk/async_.py index df4c8ac0c..ef3191791 100644 --- a/src/runloop_api_client/sdk/async_.py +++ b/src/runloop_api_client/sdk/async_.py @@ -17,7 +17,7 @@ SDKBlueprintListParams, SDKBlueprintCreateParams, SDKDiskSnapshotListParams, - SDKDevboxExtraCreateParams, + SDKDevboxCreateFromImageParams, ) from .._types import Timeout, NotGiven, not_given from .._client import DEFAULT_MAX_RETRIES, AsyncRunloop @@ -68,13 +68,13 @@ async def create( async def create_from_blueprint_id( self, blueprint_id: str, - **params: Unpack[SDKDevboxExtraCreateParams], + **params: Unpack[SDKDevboxCreateFromImageParams], ) -> AsyncDevbox: """Create a devbox from an existing blueprint by identifier. :param blueprint_id: Blueprint ID to create from :type blueprint_id: str - :param params: See :typeddict:`~runloop_api_client.sdk._types.SDKDevboxExtraCreateParams` for available parameters + :param params: See :typeddict:`~runloop_api_client.sdk._types.SDKDevboxCreateFromImageParams` for available parameters :return: Wrapper bound to the newly created devbox :rtype: AsyncDevbox """ @@ -87,13 +87,13 @@ async def create_from_blueprint_id( async def create_from_blueprint_name( self, blueprint_name: str, - **params: Unpack[SDKDevboxExtraCreateParams], + **params: Unpack[SDKDevboxCreateFromImageParams], ) -> AsyncDevbox: """Create a devbox from the latest blueprint with the given name. :param blueprint_name: Blueprint name to create from :type blueprint_name: str - :param params: See :typeddict:`~runloop_api_client.sdk._types.SDKDevboxExtraCreateParams` for available parameters + :param params: See :typeddict:`~runloop_api_client.sdk._types.SDKDevboxCreateFromImageParams` for available parameters :return: Wrapper bound to the newly created devbox :rtype: AsyncDevbox """ @@ -106,13 +106,13 @@ async def create_from_blueprint_name( async def create_from_snapshot( self, snapshot_id: str, - **params: Unpack[SDKDevboxExtraCreateParams], + **params: Unpack[SDKDevboxCreateFromImageParams], ) -> AsyncDevbox: """Create a devbox initialized from a snapshot. :param snapshot_id: Snapshot ID to create from :type snapshot_id: str - :param params: See :typeddict:`~runloop_api_client.sdk._types.SDKDevboxExtraCreateParams` for available parameters + :param params: See :typeddict:`~runloop_api_client.sdk._types.SDKDevboxCreateFromImageParams` for available parameters :return: Wrapper bound to the newly created devbox :rtype: AsyncDevbox """ diff --git a/src/runloop_api_client/sdk/async_blueprint.py b/src/runloop_api_client/sdk/async_blueprint.py index 77207e758..ab070cb89 100644 --- a/src/runloop_api_client/sdk/async_blueprint.py +++ b/src/runloop_api_client/sdk/async_blueprint.py @@ -5,7 +5,7 @@ from typing_extensions import Unpack, override from ..types import BlueprintView -from ._types import RequestOptions, LongRequestOptions, SDKDevboxExtraCreateParams +from ._types import RequestOptions, LongRequestOptions, SDKDevboxCreateFromImageParams from .._client import AsyncRunloop from .async_devbox import AsyncDevbox from ..types.blueprint_build_logs_list_view import BlueprintBuildLogsListView @@ -89,11 +89,11 @@ async def delete( async def create_devbox( self, - **params: Unpack[SDKDevboxExtraCreateParams], + **params: Unpack[SDKDevboxCreateFromImageParams], ) -> "AsyncDevbox": """Create a devbox derived from the blueprint. - :param params: See :typeddict:`~runloop_api_client.sdk._types.SDKDevboxExtraCreateParams` for available parameters + :param params: See :typeddict:`~runloop_api_client.sdk._types.SDKDevboxCreateFromImageParams` for available parameters :return: Wrapper bound to the running devbox :rtype: AsyncDevbox """ diff --git a/src/runloop_api_client/sdk/async_snapshot.py b/src/runloop_api_client/sdk/async_snapshot.py index 93139ebd8..f08ee31bc 100644 --- a/src/runloop_api_client/sdk/async_snapshot.py +++ b/src/runloop_api_client/sdk/async_snapshot.py @@ -8,8 +8,8 @@ RequestOptions, LongRequestOptions, PollingRequestOptions, - SDKDevboxExtraCreateParams, SDKDiskSnapshotUpdateParams, + SDKDevboxCreateFromImageParams, ) from .._client import AsyncRunloop from .async_devbox import AsyncDevbox @@ -110,11 +110,11 @@ async def await_completed( async def create_devbox( self, - **params: Unpack[SDKDevboxExtraCreateParams], + **params: Unpack[SDKDevboxCreateFromImageParams], ) -> "AsyncDevbox": """Create a devbox restored from this snapshot. - :param params: See :typeddict:`~runloop_api_client.sdk._types.SDKDevboxExtraCreateParams` for available parameters + :param params: See :typeddict:`~runloop_api_client.sdk._types.SDKDevboxCreateFromImageParams` for available parameters :return: Wrapper bound to the running devbox :rtype: AsyncDevbox """ diff --git a/src/runloop_api_client/sdk/blueprint.py b/src/runloop_api_client/sdk/blueprint.py index e2c00826d..bc06b0601 100644 --- a/src/runloop_api_client/sdk/blueprint.py +++ b/src/runloop_api_client/sdk/blueprint.py @@ -5,7 +5,7 @@ from typing_extensions import Unpack, override from ..types import BlueprintView -from ._types import RequestOptions, LongRequestOptions, SDKDevboxExtraCreateParams +from ._types import RequestOptions, LongRequestOptions, SDKDevboxCreateFromImageParams from .devbox import Devbox from .._client import Runloop from ..types.blueprint_build_logs_list_view import BlueprintBuildLogsListView @@ -89,11 +89,11 @@ def delete( def create_devbox( self, - **params: Unpack[SDKDevboxExtraCreateParams], + **params: Unpack[SDKDevboxCreateFromImageParams], ) -> "Devbox": """Create a devbox derived from the blueprint. - :param params: See :typeddict:`~runloop_api_client.sdk._types.SDKDevboxExtraCreateParams` for available parameters + :param params: See :typeddict:`~runloop_api_client.sdk._types.SDKDevboxCreateFromImageParams` for available parameters :return: Wrapper bound to the running devbox :rtype: Devbox """ diff --git a/src/runloop_api_client/sdk/snapshot.py b/src/runloop_api_client/sdk/snapshot.py index 4a973a68f..81c654385 100644 --- a/src/runloop_api_client/sdk/snapshot.py +++ b/src/runloop_api_client/sdk/snapshot.py @@ -8,8 +8,8 @@ RequestOptions, LongRequestOptions, PollingRequestOptions, - SDKDevboxExtraCreateParams, SDKDiskSnapshotUpdateParams, + SDKDevboxCreateFromImageParams, ) from .devbox import Devbox from .._client import Runloop @@ -110,11 +110,11 @@ def await_completed( def create_devbox( self, - **params: Unpack[SDKDevboxExtraCreateParams], + **params: Unpack[SDKDevboxCreateFromImageParams], ) -> "Devbox": """Create a devbox restored from this snapshot. - :param params: See :typeddict:`~runloop_api_client.sdk._types.SDKDevboxExtraCreateParams` for available parameters + :param params: See :typeddict:`~runloop_api_client.sdk._types.SDKDevboxCreateFromImageParams` for available parameters :return: Wrapper bound to the running devbox :rtype: Devbox """ diff --git a/src/runloop_api_client/sdk/sync.py b/src/runloop_api_client/sdk/sync.py index 3a931d1a5..04d9b67cf 100644 --- a/src/runloop_api_client/sdk/sync.py +++ b/src/runloop_api_client/sdk/sync.py @@ -17,7 +17,7 @@ SDKBlueprintListParams, SDKBlueprintCreateParams, SDKDiskSnapshotListParams, - SDKDevboxExtraCreateParams, + SDKDevboxCreateFromImageParams, ) from .devbox import Devbox from .._types import Timeout, NotGiven, not_given @@ -68,13 +68,13 @@ def create( def create_from_blueprint_id( self, blueprint_id: str, - **params: Unpack[SDKDevboxExtraCreateParams], + **params: Unpack[SDKDevboxCreateFromImageParams], ) -> Devbox: """Create a devbox from an existing blueprint by identifier. :param blueprint_id: Blueprint ID to create from :type blueprint_id: str - :param params: See :typeddict:`~runloop_api_client.sdk._types.SDKDevboxExtraCreateParams` for available parameters + :param params: See :typeddict:`~runloop_api_client.sdk._types.SDKDevboxCreateFromImageParams` for available parameters :type params: :return: Wrapper bound to the newly created devbox :rtype: Devbox @@ -88,13 +88,13 @@ def create_from_blueprint_id( def create_from_blueprint_name( self, blueprint_name: str, - **params: Unpack[SDKDevboxExtraCreateParams], + **params: Unpack[SDKDevboxCreateFromImageParams], ) -> Devbox: """Create a devbox from the latest blueprint with the given name. :param blueprint_name: Blueprint name to create from :type blueprint_name: str - :param params: See :typeddict:`~runloop_api_client.sdk._types.SDKDevboxExtraCreateParams` for available parameters + :param params: See :typeddict:`~runloop_api_client.sdk._types.SDKDevboxCreateFromImageParams` for available parameters :return: Wrapper bound to the newly created devbox :rtype: Devbox """ @@ -107,13 +107,13 @@ def create_from_blueprint_name( def create_from_snapshot( self, snapshot_id: str, - **params: Unpack[SDKDevboxExtraCreateParams], + **params: Unpack[SDKDevboxCreateFromImageParams], ) -> Devbox: """Create a devbox initialized from a snapshot. :param snapshot_id: Snapshot ID to create from :type snapshot_id: str - :param params: See :typeddict:`~runloop_api_client.sdk._types.SDKDevboxExtraCreateParams` for available parameters + :param params: See :typeddict:`~runloop_api_client.sdk._types.SDKDevboxCreateFromImageParams` for available parameters :return: Wrapper bound to the newly created devbox :rtype: Devbox """ From 248e1527338057f9bfcd18ff18ab0a3db0ba8641 Mon Sep 17 00:00:00 2001 From: Siddarth Chalasani Date: Thu, 20 Nov 2025 15:10:19 -0800 Subject: [PATCH 7/7] change type name in docs as well --- docs/sdk/types.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/sdk/types.rst b/docs/sdk/types.rst index 27a26ddbb..ba46d7ef2 100644 --- a/docs/sdk/types.rst +++ b/docs/sdk/types.rst @@ -28,7 +28,7 @@ Creation Parameters .. autotypeddict:: runloop_api_client.sdk._types.SDKDevboxCreateParams -.. autotypeddict:: runloop_api_client.sdk._types.SDKDevboxExtraCreateParams +.. autotypeddict:: runloop_api_client.sdk._types.SDKDevboxCreateFromImageParams Execution Parameters ~~~~~~~~~~~~~~~~~~~~