Skip to main content

ForgeVM Python SDK

Python client for ForgeVM -- self-hosted compute sandboxes for LLMs.

Install

pip install forgevm

Quick Start

from forgevm import Client

client = Client("http://localhost:7423")

# Spawn a sandbox
sandbox = client.spawn(image="alpine:latest")

# Execute commands
result = sandbox.exec("echo hello")
print(result.stdout)  # "hello\n"

# File operations
sandbox.write_file("/tmp/hello.txt", "Hello, world!")
content = sandbox.read_file("/tmp/hello.txt")

# Extend TTL
sandbox.extend_ttl("30m")

# Auto-cleanup with context manager
with client.spawn(image="python:3.12") as sb:
    sb.exec("python3 -c 'print(1+1)'")
# sandbox destroyed automatically

# Streaming output
for chunk in sandbox.exec_stream("ping -c 3 localhost"):
    print(chunk.data, end="")

sandbox.destroy()

Async Support

from forgevm import AsyncClient

async with AsyncClient("http://localhost:7423") as client:
    sandbox = await client.spawn(image="alpine:latest")
    result = await sandbox.exec("echo hello")
    await sandbox.destroy()

License

MIT

Metadata

Release files for forgevm 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for forgevm 0.1.2
File Size Uploaded Provenance Actions
forgevm-0.1.2.tar.gz 13.6 kB Without provenance Details for forgevm-0.1.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for forgevm 0.1.2
File Interpreter ABI Platform Actions
forgevm-0.1.2-py3-none-any.whl Python 3 none any Details for forgevm-0.1.2-py3-none-any.whl

Total release size: 25.0 kB

Release files / forgevm-0.1.2.tar.gz

Download URL forgevm-0.1.2.tar.gz
Size 13.6 kB
Tags Source
SHA-256 checksum
How to use checksums
bcb5f0663f1e3f9a589efc7c706899bed45d7d42c1a5381e3fbbf1d0317eff2a
BLAKE2b-256 checksum
How to use checksums
b54e4d607c4d6445a793467f6295f20d0f8519b583d08a6435f56126654ac238
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Release files / forgevm-0.1.2-py3-none-any.whl

Download URL forgevm-0.1.2-py3-none-any.whl
Size 11.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
17f8449341a624f93a20cd55ccb2606a3db784f3a976842c27674a501f66ab41
BLAKE2b-256 checksum
How to use checksums
c5f4901942582367bedbcb6c9f4bc6a83b50da8cfac9d3d0f1a9e20ee4a2dd6d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Security for forgevm 0.1.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page