foreverVM
| repo | version |
|---|---|
| cli | |
| sdk |
foreverVM provides an API for running arbitrary, stateful Python code securely.
The core concepts in foreverVM are machines and instructions.
Machines represent a stateful Python process. You interact with a machine by running instructions (Python statements and expressions) on it, and receiving the results. A machine processes one instruction at a time.
Getting started
You will need an API token (if you need one, reach out to paul@jamsocket.com).
The easiest way to try out foreverVM is using the CLI. First, you will need to log in:
uvx forevervm login
Once logged in, you can open a REPL interface with a new machine:
uvx forevervm repl
When foreverVM starts your machine, it gives it an ID that you can later use to reconnect to it. You can reconnect to a machine like this:
uvx forevervm repl [machine_name]
You can list your machines (in reverse order of creation) like this:
uvx forevervm machine list
You don't need to terminate machines -- foreverVM will automatically swap them from memory to disk when they are idle, and then automatically swap them back when needed. This is what allows foreverVM to run repls “forever”.
Using the API
import os
from forevervm_sdk import ForeverVM
token = os.getenv('FOREVERVM_TOKEN')
if not token:
raise ValueError('FOREVERVM_TOKEN is not set')
# Initialize foreverVM
fvm = ForeverVM(token)
# Connect to a new machine
with fvm.repl() as repl:
# Execute some code
exec_result = repl.exec('4 + 4')
# Get the result
print('result:', exec_result.result)
# Execute code with output
exec_result = repl.exec('for i in range(10):\n print(i)')
for output in exec_result.output:
print(output["stream"], output["data"])
Metadata
Release files for forevervm-sdk 0.1.35
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 |
|---|---|---|---|---|
| forevervm_sdk-0.1.35.tar.gz | 11.8 kB | Without provenance | Details for forevervm_sdk-0.1.35.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| forevervm_sdk-0.1.35-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details for forevervm_sdk-0.1.35-py2.py3-none-any.whl |
Total release size: 17.1 kB
Release files / forevervm_sdk-0.1.35.tar.gz
| Download URL | forevervm_sdk-0.1.35.tar.gz |
|---|---|
| Size | 11.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b62424b5f97472b7a1b5da6150a423db4b42c10b3f40244ad29d3131051ed908
|
|
BLAKE2b-256 checksum How to use checksums |
16414e40010af77fe55097993522b62c2c3d5504fc9f7ff74787dac6ee777f4f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.6.11
|
Release files / forevervm_sdk-0.1.35-py2.py3-none-any.whl
| Download URL | forevervm_sdk-0.1.35-py2.py3-none-any.whl |
|---|---|
| Size | 5.3 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
f2250d6b22cc831ff72ed229fb310e3e954de696b4a6ba9d6563f9c11ae3e2f0
|
|
BLAKE2b-256 checksum How to use checksums |
401c4c28a7280de98765fce141aecc40551d24e3e1b6a700b813b520ec6f043c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.6.11
|
Security for forevervm-sdk 0.1.35
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.