diff --git a/src/runloop_api_client/sdk/async_.py b/src/runloop_api_client/sdk/async_.py index b32310be6..d1a9959b7 100644 --- a/src/runloop_api_client/sdk/async_.py +++ b/src/runloop_api_client/sdk/async_.py @@ -216,6 +216,23 @@ class AsyncBlueprintOps: ... dockerfile="FROM ubuntu:22.04\\nRUN apt-get update", ... ) >>> blueprints = await runloop.blueprint.list() + + To use a local directory as a build context, use an object. + + Example: + >>> from datetime import timedelta + >>> from runloop_api_client.types.blueprint_build_parameters import BuildContext + >>> + >>> runloop = AsyncRunloopSDK() + >>> obj = await runloop.object_storage.upload_from_dir( + ... "./", + ... ttl=timedelta(hours=1), + ... ) + >>> blueprint = await runloop.blueprint.create( + ... name="my-blueprint", + ... dockerfile="FROM ubuntu:22.04\\nCOPY . .\\n", + ... build_context=BuildContext(type="object", object_id=obj.id), + ... ) """ def __init__(self, client: AsyncRunloop) -> None: diff --git a/src/runloop_api_client/sdk/sync.py b/src/runloop_api_client/sdk/sync.py index 7368a0f7a..44a016ecd 100644 --- a/src/runloop_api_client/sdk/sync.py +++ b/src/runloop_api_client/sdk/sync.py @@ -215,6 +215,23 @@ class BlueprintOps: ... name="my-blueprint", dockerfile="FROM ubuntu:22.04\\nRUN apt-get update" ... ) >>> blueprints = runloop.blueprint.list() + + To use a local directory as a build context, use an object. + + Example: + >>> from datetime import timedelta + >>> from runloop_api_client.types.blueprint_build_parameters import BuildContext + >>> + >>> runloop = RunloopSDK() + >>> obj = runloop.object_storage.upload_from_dir( + ... "./", + ... ttl=timedelta(hours=1), + ... ) + >>> blueprint = runloop.blueprint.create( + ... name="my-blueprint", + ... dockerfile="FROM ubuntu:22.04\\nCOPY . .\\n", + ... build_context=BuildContext(type="object", object_id=obj.id), + ... ) """ def __init__(self, client: Runloop) -> None: