fcvm for Python
A client for the HTTP API of fcvm, which runs disposable, isolated Firecracker microVMs with container ergonomics. Use it to give an agent framework, a test harness or a build pipeline real VM sandboxes: create one from any OCI image, run commands, move files, snapshot it and fork running copies in about 150 ms.
The client has no dependencies and needs Python 3.9 or newer. The VMs run on a Linux host with KVM where fcvm is installed; the client itself runs anywhere that can reach that host's API.
pip install fcvm
from fcvm import Client
c = Client()
with c.create("box", template="python-sandbox", ttl="1h") as sb: # removed when the block ends
out = sb.run("pip install -q requests && python -c 'import requests; print(requests.__version__)'")
sb.write_file("/work/app.py", "print('hi')\n")
print(sb.exec("python /work/app.py").stdout) # ExecResult: exit_code, stdout, stderr
job = sb.exec("python -m http.server 8000", background=True) # a Job
port = sb.publish(8000) # http://127.0.0.1:{port} on the host
job.kill()
snap = c.sandbox("prepared").snapshot("ready")
forks = snap.fork("try", count=3) # three running Sandbox objects
Client() finds the local fcvm service by itself. For another host, set
FCVM_URL and FCVM_TOKEN. The token gives full control of fcvm, so treat
it like an SSH key.
Apache License 2.0.
Metadata
Release files for fcvm 0.11.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| fcvm-0.11.1.tar.gz | 11.5 kB | Without provenance | Details for fcvm-0.11.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| fcvm-0.11.1-py3-none-any.whl | Python 3 | none | any | Details for fcvm-0.11.1-py3-none-any.whl |
Total release size: 23.7 kB
Release files / fcvm-0.11.1.tar.gz
| Download URL | fcvm-0.11.1.tar.gz |
|---|---|
| Size | 11.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
432b91ec1732361126f58898afe153e14ae1ff3b9d2434a5f53a07043a186454
|
|
BLAKE2b-256 checksum How to use checksums |
30b1ae5693b2d7598e6cb67486568c44f182484b0c0efb8f15b58f863341f458
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.4
|
Release files / fcvm-0.11.1-py3-none-any.whl
| Download URL | fcvm-0.11.1-py3-none-any.whl |
|---|---|
| Size | 12.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
bec89eaa40fd70695322375b1e28a20ed92b729849c4a35d2c80a4709dadda5b
|
|
BLAKE2b-256 checksum How to use checksums |
05b504922c0852d57acae5abc8e2c89f3c459526b494a8685989256899b39e21
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.4
|
Security for fcvm 0.11.1
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.