Current collected state Current
Observed since 20 Oct, 20:47 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
A Python client for the Aerol.ai MicroVM sandbox API.
A lightweight Python SDK for the Aerol.ai MicroVM sandbox API.
pip install aerolvm-sdk
For local development from this repository:
cd sdk/python
pip install .
from microvm import MicroVM
client = MicroVM(pat_token="${SB_PAT_TOKEN}", api_url="https://sandbox.example.com")
health = client.health()
print(health)
print(health["sshGateway"])
sandbox = client.create(
{
"image": "ghcr.io/aerol-ai/ubuntu:22.04",
"lifecycle": {
"stopIfIdleFor": 3_600_000_000_000,
"destroyAtAge": 86_400_000_000_000,
},
"failover": {"policy": "recreate"},
"mounts": [
{
"type": "s3",
"target": "/workspace",
"source": "s3://bucket/prefix",
"credentials": {"access_key_id": "AKIA...", "secret_access_key": "SECRET"},
}
],
}
)
print(sandbox.sshPublicKey)
print(sandbox.sshPrivateKey) # only returned by create()
print(client.mounts(sandbox.id))
sandbox.update_lifecycle(
{
"stopIfIdleFor": 7_200_000_000_000,
"destroyAtAge": 172_800_000_000_000,
}
)
print(sandbox.lifecycle)
from microvm import Image, MicroVM
client = MicroVM(pat_token="${SB_PAT_TOKEN}", api_url="https://sandbox.example.com")
image = Image.base("ubuntu:22.04").run_commands("apt-get update", "apt-get install -y curl")
# create() accepts an Image directly
sandbox = client.create({"image": image})
# or build it explicitly and reuse the content-addressed tag
tag = client.build_image(image)
print(tag)
python examples/create_sandbox.py --api-url http://127.0.0.1:21212 --pat-token test --image ghcr.io/aerol-ai/ubuntu:22.04
import sys
handle = sandbox.exec_stream(
{
"command": "bash",
"tty": True,
"cols": 120,
"rows": 40,
"onStdout": lambda chunk: sys.stdout.buffer.write(chunk),
}
)
handle.write("echo hello\n")
result = handle.wait()
print(result)
import sys
session = sandbox.create_session(
{
"name": "shell",
"command": "bash",
"workDir": "/workspace",
"pty": True,
"cols": 120,
"rows": 40,
}
)
print(session)
print(sandbox.list_sessions())
print(sandbox.session_log(session["id"]).decode("utf-8"))
handle = sandbox.attach_session(
session["id"],
{
"cols": 120,
"rows": 40,
"onStdout": lambda chunk: sys.stdout.buffer.write(chunk),
}
)
handle.write("echo attached\n")
print(handle.wait())
Download counts and popularity will appear here as the collector receives them.
| Version | Published | Direct dependencies | Open version |
|---|---|---|---|
| 0.6.4 | 10 Oct 2026 | 1 |
This describes our collected data; it is not a security assessment.
Observed since 20 Oct, 20:47 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package:80dbb4bdef567f4cbe36272146a641b19f110e4addd487be9d4db3715813962c