ECI-backed sandbox manager with an Agent interface.
Project description
eci-as-sandbox
ECI-backed sandbox manager with an AgentBay-style interface. This package wraps
alibabacloud-eci20180808 and exposes a lightweight API for managing
container-group sandboxes.
Install
pdm add eci-as-sandbox
Environment
Set standard Alibaba Cloud credentials:
set ALIBABA_CLOUD_ACCESS_KEY_ID=...
set ALIBABA_CLOUD_ACCESS_KEY_SECRET=...
set ALIBABA_CLOUD_REGION_ID=cn-shanghai
Optional overrides:
set ECI_SANDBOX_ENDPOINT=eci.cn-shanghai.aliyuncs.com
set ECI_SANDBOX_TIMEOUT_MS=60000
set ECI_SANDBOX_VSWITCH_ID=vsw-xxx
set ECI_SANDBOX_SECURITY_GROUP_ID=sg-xxx
set ECI_SANDBOX_AUTO_CREATE_EIP=true
set ECI_SANDBOX_EIP_BANDWIDTH=5
set ECI_SANDBOX_EIP_INSTANCE_ID=eip-xxx
set ECI_SANDBOX_IMAGE=registry.cn-shanghai.aliyuncs.com/eci_open/nginx:latest
Quick start
from eci_as_sandbox import EciSandbox
client = EciSandbox()
result = client.create(
image="registry.cn-hangzhou.aliyuncs.com/eci_open/nginx:latest",
name="sandbox-demo",
cpu=1.0,
memory=2.0,
v_switch_id="vsw-xxx",
security_group_id="sg-xxx",
)
if result.success:
sandbox = result.sandbox
info = sandbox.info()
print(info.data.status)
sandbox.delete()
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
eci_as_sandbox-0.1.0.tar.gz
(12.4 kB
view details)
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 eci_as_sandbox-0.1.0.tar.gz.
File metadata
- Download URL: eci_as_sandbox-0.1.0.tar.gz
- Upload date:
- Size: 12.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: pdm/2.26.4 CPython/3.12.0 Windows/11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3a87f433c55c806f59991cfc93425820534da95fd2aad9f1a647c6711eb78d0e
|
|
| MD5 |
07f0a8e1d70db277e724060aedb169f6
|
|
| BLAKE2b-256 |
80dbfed4e085bdd13a373e70150fb28b55d29542271d5af09e311c82262f5711
|
File details
Details for the file eci_as_sandbox-0.1.0-py3-none-any.whl.
File metadata
- Download URL: eci_as_sandbox-0.1.0-py3-none-any.whl
- Upload date:
- Size: 16.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: pdm/2.26.4 CPython/3.12.0 Windows/11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f8cca7c142f42520de9d2368e1da75fda26905fd318423cc9661c31f142b63a8
|
|
| MD5 |
469c67c6788fb3bf590e190c5706f6a5
|
|
| BLAKE2b-256 |
2a39d7e37860c13751012e84ba184a3d09bdba128e24ed6b6bf03812e29699d9
|