$git clone https://github.com/shroominic/codebox-apiCodeBox is the simplest cloud infrastructure for your LLM Apps and Services. It allows you to run python code in an isolated/sandboxed environment.
| 1 | # CodeBox |
| 2 | |
| 3 | [](https://badge.fury.io/py/codeboxapi) |
| 4 | [](https://github.com/shroominic/codebox-api/actions/workflows/code-check.yml) |
| 5 |  |
| 6 |  |
| 7 | |
| 8 | CodeBox is the simplest cloud infrastructure for your LLM Apps and Services. |
| 9 | It allows you to run python code in an isolated/sandboxed environment. |
| 10 | |
| 11 | ## Installation |
| 12 | |
| 13 | You can install CodeBox with pip: |
| 14 | |
| 15 | ```bash |
| 16 | pip install codeboxapi |
| 17 | ``` |
| 18 | |
| 19 | ## Usage |
| 20 | |
| 21 | ```bash |
| 22 | export CODEBOX_API_KEY=local # for local development |
| 23 | export CODEBOX_API_KEY=docker # for small projects |
| 24 | export CODEBOX_API_KEY=sk-*************** # for production |
| 25 | ``` |
| 26 | |
| 27 | ```python |
| 28 | from codeboxapi import CodeBox |
| 29 | |
| 30 | # create a new codebox |
| 31 | codebox = CodeBox() |
| 32 | |
| 33 | # run some code |
| 34 | codebox.exec("a = 'Hello'") |
| 35 | codebox.exec("b = 'World!'") |
| 36 | codebox.exec("x = a + ', ' + b") |
| 37 | result = codebox.exec("print(x)") |
| 38 | |
| 39 | print(result) |
| 40 | # Hello, World! |
| 41 | ``` |
| 42 | |
| 43 | ## Where to get your api-key? |
| 44 | |
| 45 | Checkout the [pricing page](https://codeboxapi.com/pricing) of CodeBoxAPI. By subscribing to a plan, |
| 46 | you will receive an account with an api-key. |
| 47 | Bear in mind, we don't have many automations set up right now, |
| 48 | so you'll need to write an [email](mailto:team@codeboxapi.com) for things like refunds, |
| 49 | sub cancellations, or upgrades. |
| 50 | |
| 51 | ## Docs |
| 52 | |
| 53 | Checkout the [documentation](https://shroominic.github.io/codebox-api/) for more details! |
| 54 | |
| 55 | ## Contributing |
| 56 | |
| 57 | Feel free to contribute to this project. |
| 58 | You can open an issue or submit a pull request. |
| 59 | |
| 60 | ## License |
| 61 | |
| 62 | [MIT](https://choosealicense.com/licenses/mit/) |
| 63 | |
| 64 | ## Contact |
| 65 | |
| 66 | You can contact me at [team@codeboxapi.com](mailto:team@codeboxapi.com) |