Skip to main content

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

mv37_workdir-0.3.1.tar.gz (6.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mv37_workdir-0.3.1-py3-none-any.whl (6.7 kB view details)

Uploaded Python 3

File details

Details for the file mv37_workdir-0.3.1.tar.gz.

File metadata

  • Download URL: mv37_workdir-0.3.1.tar.gz
  • Upload date:
  • Size: 6.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for mv37_workdir-0.3.1.tar.gz
Algorithm Hash digest
SHA256 a5f3bbc3c7241355f8d5003113e807fbf412f70199abedb7e8396eaec9d97c3b
MD5 84e68d990a3772825124cbfb4c9af92b
BLAKE2b-256 b7e2ea6844eb476edd085c3741155d989f057914eb92e205be94d07e6d13ec6f

See more details on using hashes here.

Provenance

The following attestation bundles were made for mv37_workdir-0.3.1.tar.gz:

Publisher: publish-sdks.yml on mv37-org/workdir

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mv37_workdir-0.3.1-py3-none-any.whl.

File metadata

  • Download URL: mv37_workdir-0.3.1-py3-none-any.whl
  • Upload date:
  • Size: 6.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for mv37_workdir-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 fe01a42293b3b0db77cdb14f1d0db83e3739f3e78e890be76a163d9446d85983
MD5 c15f001ce69dc51dbcd59dfc941e6c3b
BLAKE2b-256 04246aceb3cd90b1e7e26cef27bab1d4f9f1c7efe7533260dc8aa47366ad66e2

See more details on using hashes here.

Provenance

The following attestation bundles were made for mv37_workdir-0.3.1-py3-none-any.whl:

Publisher: publish-sdks.yml on mv37-org/workdir

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page