Skip to content

Commit 6af891e

Browse files
authored
docs: restructured sync vs async sdk and resources, added support for more type references (#679)
* reorganize structure + add relevant base api types * don't document inheritance and undocumented members, and separate sync and async documentation into separate pages * clean up class docstrings * fix example type * restructuring to give each resource a separate page * renamed SDKDevboxExtraCreateParams to SDKDevboxCreateFromImageParams * change type name in docs as well
1 parent 1febe28 commit 6af891e

30 files changed

Lines changed: 248 additions & 226 deletions

docs/api/index.rst

Lines changed: 0 additions & 135 deletions
This file was deleted.

docs/conf.py

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
project = "Runloop Python SDK"
1616
copyright = "2025, Runloop"
1717
author = "Runloop"
18-
release = "0.68.0"
1918

2019
# -- General configuration ---------------------------------------------------
2120
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
@@ -40,18 +39,9 @@
4039

4140
# -- Extension configuration -------------------------------------------------
4241

43-
# Napoleon settings
44-
napoleon_google_docstring = False
45-
napoleon_numpy_docstring = False
46-
napoleon_use_param = True
47-
napoleon_use_rtype = True
48-
napoleon_use_ivar = True
49-
5042
# Autodoc settings
5143
autodoc_default_options = {
5244
"members": None,
53-
"undoc-members": None,
54-
"show-inheritance": None,
5545
}
5646

5747
autodoc_typehints = "description"
@@ -60,5 +50,4 @@
6050
# Intersphinx mapping
6151
intersphinx_mapping = {
6252
"python": ("https://docs.python.org/3", None),
63-
"httpx": ("https://www.python-httpx.org", None),
6453
}

docs/index.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ and asynchronous variants to match your runtime requirements.
99
:maxdepth: 2
1010
:caption: Contents:
1111

12-
api/index
12+
sdk/index
1313

1414
Installation
1515
------------
@@ -42,16 +42,16 @@ Asynchronous Example
4242

4343
.. code-block:: python
4444
45+
import asyncio
4546
from runloop_api_client import AsyncRunloopSDK
4647
4748
async def main():
4849
runloop = AsyncRunloopSDK()
4950
50-
async with runloop.devbox.create(name="my-devbox") as devbox:
51+
async with await runloop.devbox.create(name="my-devbox") as devbox:
5152
result = await devbox.cmd.exec(command="echo 'Hello from Runloop!'")
5253
print(await result.stdout())
5354
54-
import asyncio
5555
asyncio.run(main())
5656
5757
Indices and tables

docs/sdk/async/blueprint.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
Blueprint
2+
=========
3+
4+
The ``AsyncBlueprint`` class provides asynchronous methods for managing devbox blueprints.
5+
6+
.. automodule:: runloop_api_client.sdk.async_blueprint
7+
:members:
8+

docs/sdk/async/devbox.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
Devbox
2+
======
3+
4+
The ``AsyncDevbox`` class provides asynchronous methods for managing and interacting with a devbox instance.
5+
6+
.. automodule:: runloop_api_client.sdk.async_devbox
7+
:members:
8+

docs/sdk/async/execution.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
Execution
2+
=========
3+
4+
The ``AsyncExecution`` class represents an asynchronous command execution in progress.
5+
6+
.. automodule:: runloop_api_client.sdk.async_execution
7+
:members:
8+
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
Execution Result
2+
================
3+
4+
The ``AsyncExecutionResult`` class represents the result of a completed command execution.
5+
6+
.. automodule:: runloop_api_client.sdk.async_execution_result
7+
:members:
8+

docs/sdk/async/index.rst

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
Asynchronous SDK
2+
================
3+
4+
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.
5+
6+
Core Module
7+
-----------
8+
9+
The core asynchronous SDK module provides async operation classes.
10+
11+
.. autoclass:: runloop_api_client.sdk.async_.AsyncRunloopSDK
12+
13+
.. automodule:: runloop_api_client.sdk.async_
14+
15+
Resource Modules
16+
----------------
17+
18+
Asynchronous resource classes for working with devboxes, blueprints, snapshots, and more.
19+
20+
.. toctree::
21+
:maxdepth: 1
22+
23+
devbox
24+
execution
25+
execution_result
26+
blueprint
27+
snapshot
28+
storage_object
29+

docs/sdk/async/snapshot.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
Snapshot
2+
========
3+
4+
The ``AsyncSnapshot`` class provides asynchronous methods for managing devbox snapshots.
5+
6+
.. automodule:: runloop_api_client.sdk.async_snapshot
7+
:members:
8+

docs/sdk/async/storage_object.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
Storage Object
2+
==============
3+
4+
The ``AsyncStorageObject`` class provides asynchronous methods for managing storage objects.
5+
6+
.. automodule:: runloop_api_client.sdk.async_storage_object
7+
:members:
8+

0 commit comments

Comments
 (0)