> ## Documentation Index
> Fetch the complete documentation index at: https://getfloo.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Move from Modal to floo sandboxes

> floo's Python SDK is Modal-compatible. Change one import and one key, and a program written for Modal's Sandbox runs on floo.

floo's Python SDK is Modal-compatible: `floo_sandbox` has `App`, `Image`, `Sandbox`, `Secret` and `Volume` under Modal's names. A program written for Modal's `Sandbox` runs on floo after it changes its import and its key.

## 1. Install the SDK

```bash theme={null}
pip install floo-sandbox
```

It needs Python 3.10 or later and has no dependencies.

## 2. Change the import

```python theme={null}
import floo_sandbox as modal  # was: import modal
```

The rest of the program stays as it is: `modal.App.lookup`, `modal.Sandbox.create`, `sb.exec` and `sb.terminate` are the same calls.

In a new program, name it `floo`, as the rest of these docs do:

```python theme={null}
import floo_sandbox as floo

app = floo.App.lookup("agent-demo", create_if_missing=True)
sb = floo.Sandbox.create(app=app, timeout=600)
print(sb.exec("echo", "hello").stdout.read())
sb.terminate()
```

## 3. Change the key

Set `FLOO_API_KEY` to a floo API key from the dashboard's Settings, in place of `MODAL_TOKEN_ID` and `MODAL_TOKEN_SECRET`.

```bash theme={null}
export FLOO_API_KEY=<your floo API key>
```

A key that belongs to one organization acts in it. For a person's key, also set `FLOO_ORG_ID` to the organization the program acts in.

## What is different

floo runs sandboxes. The rest of Modal's SDK, such as functions and GPUs, is not in `floo_sandbox`.

An option of `Sandbox.create` that floo does not take is refused by name, never ignored, so a program that depends on one fails at that call. [Differences from Modal](https://getfloo.com/docs/guides/sandboxes.md#differences-from-modal) lists them.

On floo, a sandbox's files need no machine: file calls are answered from its workspace, and a micro-VM attaches only while a command runs. A program that mostly reads and writes files bills for fewer seconds than its sandbox lives. See [Which calls need a machine](https://getfloo.com/docs/guides/sandboxes.md#which-calls-need-a-machine) and [Pricing](https://getfloo.com/docs/guides/sandboxes.md#pricing).

## Next

[Sandboxes](https://getfloo.com/docs/guides/sandboxes.md) covers sizes, persistent sandboxes, agent workers, network rules and secrets.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.