Skip to content

Commit 90c63f5

Browse files
authored
Update README.md
1 parent 7a0462c commit 90c63f5

File tree

1 file changed

+53
-2
lines changed

1 file changed

+53
-2
lines changed

README.md

Lines changed: 53 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,53 @@
1-
# super-robot
2-
Python & JS/TS SDKs for embedding code execution capabilities in AI apps
1+
<!-- <p align="center">
2+
<img width="100" src="/readme-assets/logo-circle.png" alt="r1z logo">
3+
</p> -->
4+
5+
![r1z SDK Preview](https://i.imgur.com/QYftu1j.png)
6+
7+
## What is R1Z?
8+
[r1z](https://www.r1z.dev/) is an open-source tooling that runs AI-generated code in securely isolated cloud sandboxes. To start and control sandboxes, use our [JavaScript SDK](https://www.npmjs.com/package/@r1z/code-interpreter) or [Python SDK](https://pypi.org/project/r1z_code_interpreter).
9+
10+
## Run your first Sandbox
11+
12+
### 1. Install SDK
13+
14+
JavaScript / TypeScript
15+
```
16+
npm i @r1z/code-interpreter
17+
```
18+
19+
Python
20+
```
21+
pip install r1z-code-interpreter
22+
```
23+
24+
### 2. Get your r1z API key
25+
1. Sign up to r1z [here](https://r1z.dev).
26+
2. Get your API key [here](https://dash-r1z.dev/).
27+
3. Set environment variable with your API key.
28+
```
29+
r1z_API_KEY=r1z_***
30+
```
31+
32+
### 3. Execute code with code interpreter inside Sandbox
33+
34+
JavaScript / TypeScript
35+
```ts
36+
import { Sandbox } from '@r1z/code-interpreter'
37+
38+
const sbx = await Sandbox.create()
39+
await sbx.runCode('x = 1')
40+
41+
const execution = await sbx.runCode('x+=1; x')
42+
console.log(execution.text) // outputs 2
43+
```
44+
45+
Python
46+
```py
47+
from r1z_code_interpreter import Sandbox
48+
49+
with Sandbox() as sandbox:
50+
sandbox.run_code("x = 1")
51+
execution = sandbox.run_code("x+=1; x")
52+
print(execution.text) # outputs 2
53+
```

0 commit comments

Comments
 (0)