Skip to content

Commit d08f0bc

Browse files
committed
Document additional interpreters
1 parent 8f77899 commit d08f0bc

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,24 @@ Name | Description
105105
`SNEKBOX_DEBUG` | Enable debug logging if set to a non-empty value.
106106
`SNEKBOX_SENTRY_DSN` | [Data Source Name] for Sentry. Sentry is disabled if left unset.
107107

108+
### Additional Interpreters
109+
110+
By default, snekbox will use and make available the system Python (the version used to run snekbox itself). Additional interpreters or binaries should be placed in `/snekbin/` which is mounted to the nsjail container.
111+
112+
You can use the `executable_path` parameter in `POST` requests to `/eval` to select an interpreter, e.g.
113+
114+
```js
115+
{
116+
"executable_path": "/snekbin/python/3.14/bin/python",
117+
// Rest of /eval body
118+
...
119+
}
120+
```
121+
122+
The default interpreter is at `/snekbin/python/default/bin/python`, you can symlink `/snekbin/python/default` to another interpreter such as `/snekbin/python/3.14` to change this default.
123+
124+
See [`Dockerfile.pydis`](Dockerfile.pydis) for an example using additional prebuilt interpreters and how to change the defaults.. This uses images built from [`python-discord/python-builds`](https://github.com/python-discord/python-builds).
125+
108126
## Third-party Packages
109127

110128
By default, the Python interpreter has no access to any packages besides the standard library. Even snekbox's own dependencies like Falcon and Gunicorn are not exposed.

0 commit comments

Comments
 (0)