Typed Python SDK for the Islo sandbox platform
Project description
Islo Python SDK
Typed Python SDK for the Islo sandbox platform. Create, manage, and execute code in isolated VM-based sandboxes.
Installation
pip install islo
Quick Start
from islo import Islo
# Automatically reads ISLO_API_KEY from environment
client = Islo()
# Create a sandbox
sandbox = client.sandboxes.create_sandbox(
name="my-sandbox",
image="ubuntu:22.04",
vcpus=2,
memory_mb=4096,
)
# Execute a command
result = client.sandboxes.exec_in_sandbox(
sandbox_name=sandbox.name,
command=["echo", "hello world"],
)
print(result.exit_code)
# Clean up
client.sandboxes.delete_sandbox(sandbox_name=sandbox.name)
Authentication
Environment variable (recommended)
export ISLO_API_KEY="your-api-key"
client = Islo() # Picks up ISLO_API_KEY automatically
Explicit token
client = Islo(token="your-api-key")
Auto-refreshing token provider
from islo import Islo
from islo.custom import SyncTokenProvider
provider = SyncTokenProvider(
base_url="https://api.islo.dev",
access_key="your-access-key",
)
client = Islo(token=provider)
Configuration
| Environment Variable | Description | Default |
|---|---|---|
ISLO_API_KEY |
Bearer token for authentication | — |
ISLO_BASE_URL |
API base URL | https://api.islo.dev |
Async Support
import asyncio
from islo import AsyncIslo
async def main():
client = AsyncIslo()
sandboxes = await client.sandboxes.list_sandboxes()
print(f"Found {len(sandboxes.items)} sandboxes")
asyncio.run(main())
Development
# Install dependencies
uv sync --dev
# Run tests
uv run pytest tests/ -v
# Lint
uv run ruff check .
uv run ruff format --check .
Regenerating the SDK
The SDK is generated from the Islo API's OpenAPI spec using Fern:
# Export fresh OpenAPI spec from islo-web-api
cd ../islo-web-api
uv run python -c "import json; from src.api import app; json.dump(app.openapi(), open('../islo-sdk/fern/openapi/openapi.json', 'w'), indent=2)"
# Regenerate
cd ../islo-sdk
fern generate --group python-sdk
# Run tests to verify
uv run pytest tests/ -v
Custom code in src/islo/client.py and src/islo/custom/ is preserved across regenerations via .fernignore.
Project details
Release history Release notifications | RSS feed
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 islo-0.2.0.tar.gz.
File metadata
- Download URL: islo-0.2.0.tar.gz
- Upload date:
- Size: 52.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.3 {"installer":{"name":"uv","version":"0.11.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cd586faf66a674176a6fb0695d45b427a0f08af83a09a2e45dd52abb4f208db7
|
|
| MD5 |
1ac4b24882d7bfeb8223c7ab4f0c4861
|
|
| BLAKE2b-256 |
366685cfb22415565c96f8ec0628b0177fb35cc78decd6268c8d408a195c7cb8
|
File details
Details for the file islo-0.2.0-py3-none-any.whl.
File metadata
- Download URL: islo-0.2.0-py3-none-any.whl
- Upload date:
- Size: 80.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.3 {"installer":{"name":"uv","version":"0.11.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f5fb39d1d8e331929b5eff6903d9a15043a5ddde152dc088a04acd6f39419776
|
|
| MD5 |
5b9269257bb2b6ac401ae2f2fb59b8f3
|
|
| BLAKE2b-256 |
a0c9449b12a3c813d2dcee4e2cb46b9e70a086088258c469fb4b681c4dfabfbc
|