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
36 changes: 36 additions & 0 deletions .github/workflows/sphinx.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: "Sphinx: Render docs"

on:
release:
types: [published]
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
version: '0.9.10'
- name: Install dependencies
run: uv sync --group docs
- name: Build HTML
working-directory: docs
run: uv run make html
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: html-docs
path: docs/_build/html/
- name: Deploy
uses: peaceiris/actions-gh-pages@v4
if: github.ref == 'refs/heads/main'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/_build/html
1 change: 1 addition & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
_build/
20 changes: 20 additions & 0 deletions docs/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Minimal makefile for Sphinx documentation
#

# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SOURCEDIR = .
BUILDDIR = _build

# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

.PHONY: help Makefile

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
135 changes: 135 additions & 0 deletions docs/api/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
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:

82 changes: 82 additions & 0 deletions docs/api/typedicts.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
TypedDict 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.

Core Request Options
~~~~~~~~~~~~~~~~~~~~

.. autotypeddict:: runloop_api_client.sdk._types.ExecuteStreamingCallbacks

.. autotypeddict:: runloop_api_client.sdk._types.RequestOptions

.. autotypeddict:: runloop_api_client.sdk._types.LongRequestOptions

.. autotypeddict:: runloop_api_client.sdk._types.PollingRequestOptions

.. autotypeddict:: runloop_api_client.sdk._types.LongPollingRequestOptions

Devbox Parameters
~~~~~~~~~~~~~~~~~

.. autotypeddict:: runloop_api_client.sdk._types.SDKDevboxCreateParams

.. autotypeddict:: runloop_api_client.sdk._types.SDKDevboxExtraCreateParams

.. autotypeddict:: runloop_api_client.sdk._types.SDKDevboxExecuteParams

.. autotypeddict:: runloop_api_client.sdk._types.SDKDevboxExecuteAsyncParams

.. autotypeddict:: runloop_api_client.sdk._types.SDKDevboxListParams

File Operation Parameters
~~~~~~~~~~~~~~~~~~~~~~~~~

.. autotypeddict:: runloop_api_client.sdk._types.SDKDevboxReadFileContentsParams

.. autotypeddict:: runloop_api_client.sdk._types.SDKDevboxWriteFileContentsParams

.. autotypeddict:: runloop_api_client.sdk._types.SDKDevboxDownloadFileParams

.. autotypeddict:: runloop_api_client.sdk._types.SDKDevboxUploadFileParams

Network Operation Parameters
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. autotypeddict:: runloop_api_client.sdk._types.SDKDevboxCreateTunnelParams

.. autotypeddict:: runloop_api_client.sdk._types.SDKDevboxRemoveTunnelParams

Snapshot Parameters
~~~~~~~~~~~~~~~~~~~

.. autotypeddict:: runloop_api_client.sdk._types.SDKDevboxSnapshotDiskParams

.. autotypeddict:: runloop_api_client.sdk._types.SDKDevboxSnapshotDiskAsyncParams

.. autotypeddict:: runloop_api_client.sdk._types.SDKDiskSnapshotListParams

.. autotypeddict:: runloop_api_client.sdk._types.SDKDiskSnapshotUpdateParams

Blueprint Parameters
~~~~~~~~~~~~~~~~~~~~

.. autotypeddict:: runloop_api_client.sdk._types.SDKBlueprintCreateParams

.. autotypeddict:: runloop_api_client.sdk._types.SDKBlueprintListParams

Storage Object Parameters
~~~~~~~~~~~~~~~~~~~~~~~~~

.. autotypeddict:: runloop_api_client.sdk._types.SDKObjectCreateParams

.. autotypeddict:: runloop_api_client.sdk._types.SDKObjectListParams

.. autotypeddict:: runloop_api_client.sdk._types.SDKObjectDownloadParams
64 changes: 64 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# Configuration file for the Sphinx documentation builder.
#
# For the full list of built-in configuration values, see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html

import os
import sys

# Add the src directory to the path so we can import the package
sys.path.insert(0, os.path.abspath("../src"))

# -- Project information -----------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information

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

extensions = [
"sphinx.ext.autodoc",
"sphinx.ext.napoleon",
"sphinx.ext.intersphinx",
"sphinx.ext.viewcode",
"sphinx_toolbox.more_autodoc.autotypeddict",
"sphinx_autodoc_typehints",
]

templates_path = ["_templates"]
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]

# -- Options for HTML output -------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output

html_theme = "furo"
html_static_path = ["_static"]

# -- 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,
"undoc-members": None,
"show-inheritance": None,
}

autodoc_typehints = "description"
autodoc_typehints_description_target = "documented"

# Intersphinx mapping
intersphinx_mapping = {
"python": ("https://docs.python.org/3", None),
"httpx": ("https://www.python-httpx.org", None),
}
Loading
Loading