mv37-workdir
Python SDK for workdir.
pip install mv37-workdir
import time
from workdir import Client
workdir = Client("https://api.workdir.dev", api_key="...")
box = workdir.sandboxes.create()
print(box.exec("echo hello").stdout)
job = box.exec("pytest", background=True)
status = box.exec_status(job.cmd_id)
while status.state == "running":
time.sleep(1)
status = box.exec_status(job.cmd_id)
print(box.exec_logs(job.cmd_id))
box.delete()
workdir.templates.create(
"node-app",
create={
"image": "node-python",
"resources": {"cpu": 2, "memory_mb": 4096, "disk_gb": 16},
"startup": {"git": {"url": "https://github.com/acme/app.git", "ref": "main"}},
},
)
boxes = workdir.templates.spawn("node-app", count=2)
run = workdir.agent_runs.create(
template="node-app",
repo={"url": "https://github.com/acme/app.git", "ref": "main"},
agent="codex",
model="gpt-5",
api_key_secret="OPENAI_API_KEY",
prompt="Fix the failing tests and leave a clean diff.",
task={"name": "Fix failing tests", "labels": ["delegated"]},
verify=[{"name": "tests", "run": "pnpm test", "fail_run": True}],
github={"token_secret": "GITHUB_TOKEN", "draft": True},
)
finished = workdir.agent_runs.wait(run.id)
print(workdir.agent_runs.report(finished.id).summary)
The SDK uses only the Python standard library.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mv37_workdir-0.3.0.tar.gz.
File metadata
- Download URL: mv37_workdir-0.3.0.tar.gz
- Upload date:
- Size: 6.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c2753a3832449e92f16d46062d8462bebabc25f4c3b78f0695f80d9005f98d6d
|
|
| MD5 |
81a5fe0677287af831c33af90c05f16e
|
|
| BLAKE2b-256 |
690a79e27d64c09e672849dd5b3798162838532c5365a7ebdd2656a7cda9199b
|
Provenance
The following attestation bundles were made for mv37_workdir-0.3.0.tar.gz:
Publisher:
publish-sdks.yml on mv37-org/workdir
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mv37_workdir-0.3.0.tar.gz -
Subject digest:
c2753a3832449e92f16d46062d8462bebabc25f4c3b78f0695f80d9005f98d6d - Sigstore transparency entry: 2083356174
- Sigstore integration time:
-
Permalink:
mv37-org/workdir@6cf00d6739f0d1b0bac72ef9b20096012bc63d60 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/mv37-org
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-sdks.yml@6cf00d6739f0d1b0bac72ef9b20096012bc63d60 -
Trigger Event:
push
-
Statement type:
File details
Details for the file mv37_workdir-0.3.0-py3-none-any.whl.
File metadata
- Download URL: mv37_workdir-0.3.0-py3-none-any.whl
- Upload date:
- Size: 6.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7e9499d72bbfe5e62b28f34d03c2686bd0e36fada5cd7446840bd0a047651891
|
|
| MD5 |
0994ef4d347239733fe65ce973303c7a
|
|
| BLAKE2b-256 |
7938585024906271b338a31fe9474dcc8f9627b4b82273a0a6baa8ea0b2c8f3f
|
Provenance
The following attestation bundles were made for mv37_workdir-0.3.0-py3-none-any.whl:
Publisher:
publish-sdks.yml on mv37-org/workdir
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mv37_workdir-0.3.0-py3-none-any.whl -
Subject digest:
7e9499d72bbfe5e62b28f34d03c2686bd0e36fada5cd7446840bd0a047651891 - Sigstore transparency entry: 2083356181
- Sigstore integration time:
-
Permalink:
mv37-org/workdir@6cf00d6739f0d1b0bac72ef9b20096012bc63d60 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/mv37-org
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-sdks.yml@6cf00d6739f0d1b0bac72ef9b20096012bc63d60 -
Trigger Event:
push
-
Statement type: