foreverVM
以下摘录自该仓库的 README(片段) · 在 GitHub 读完整 README →
==================================
| 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:
Once logged in, you can open a REPL interface with a new machine:
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:
You can list your machines (in reverse order of creation) like this:
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
-------------
Working with Tags
----------------
You can create machines with tags and filter machines by tags:
Memory Limits
----------------
You can create machines with memory limits by specifying the memory size in megabytes: