Metadata-Version: 2.4
Name: floo-sandbox
Version: 0.2.0
Summary: Sandboxes for AI agents on floo: files that need no machine, and a micro-VM only while a command runs
Project-URL: Homepage, https://getfloo.com
Project-URL: Documentation, https://docs.getfloo.com
Author: floo
License-Expression: MIT
License-File: LICENSE
Keywords: agents,floo,micro-vm,sandbox
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Software Development
Classifier: Typing :: Typed
Requires-Python: >=3.10
Description-Content-Type: text/markdown

# floo sandboxes for Python

Sandboxes for your agents on [floo](https://getfloo.com), with the API of Modal's Python
`Sandbox`. A sandbox's files live in a workspace, so reading and editing them needs no
machine. A micro-VM attaches when a command runs and lets go once the sandbox goes idle, and
the sandbox keeps its files, env and id between machines.

## Install

```
pip install floo-sandbox
```

It needs Python 3.10 or later, and it has no dependencies.

## Sign in

Set `FLOO_API_KEY` to a floo API key. A key that belongs to one org acts in it. For a
person's key, set `FLOO_ORG_ID` to the org the program acts in.

## Run a command

```python
import floo_sandbox as modal

app = modal.App.lookup("my-agent", create_if_missing=True)
sandbox = modal.Sandbox.create(app=app, image=modal.Image.debian_slim(), timeout=600)

sandbox.filesystem.write_text('print("hello from floo")', "/tmp/hello.py")
process = sandbox.exec("python3", "/tmp/hello.py")
print(process.stdout.read())

sandbox.terminate()
```

A program written for Modal runs after changing its import to `import floo_sandbox as modal`
and signing in with a floo key. The docs list where floo differs from Modal:
[docs.getfloo.com](https://docs.getfloo.com).

## Versions

Every call says which version of the protocol this SDK speaks. When floo no longer serves
it, the call fails with a message to upgrade: `pip install --upgrade floo-sandbox`.

## License

MIT.
