runcode is now onlinecompiler
RunCode's code execution API is now OnlineCompiler.io,
and its Python client is onlinecompiler. New code should
use it:
pip install onlinecompiler
from onlinecompiler import OnlineCompiler
client = OnlineCompiler() # reads ONLINECOMPILER_API_KEY
result = client.run("python-3.14", "name = input()\nprint(f'Hello, {name}!')", input="Ada")
print(result["output"]) # Hello, Ada!
It runs code in 46 languages and judges it against test cases, and it is free up to 100,000 runs a month. Get an API key at https://api.onlinecompiler.io/compilers/api-keys/.
Code written for runcode 0.2.1
runcode 0.2.1 sent runs to app.runcode.io, which no longer answers. This release keeps the same
Runner working through onlinecompiler, so old code runs again after pip install -U runcode:
from runcode import Runner
runner = Runner(api_key="YOUR_ONLINECOMPILER_API_KEY")
queued = runner.execute(code="print(input())", input="hi", compiler=Runner.python39)
print(queued["id"])
What changed:
- The API key is an OnlineCompiler.io key. Without one,
Runner()reads Django'ssettings.RUNCODE_API_KEYas before, then theONLINECOMPILER_API_KEYenvironment variable. - Results are POSTed to the callback URL set on your API key in the
dashboard, with
extra_paramsechoed back. Set one there first: a key without a callback URL is refused. Acallback_urlpassed toRunner(orRUNCODE_CALLBACK_URL) is not sent, andRunnerwarns. executereturns{"status": ..., "id": ...}for the queued run, and raisesonlinecompiler.OnlineCompilerErrorwhen the run is refused (a bad key, a limit), where 0.2.1 returned nothing.- The old compiler ids run on current versions:
python39on Python 3.14,gcc49on GCC 15,cpp49on G++ 15,openjdk11on OpenJDK 25,dotnet5on C# (.NET 10),php81on PHP 8.5,fsharp5on F# (.NET 10) andruby30on Ruby 4.0. Python 2.7 (python27) is no longer offered and raisesValueError. Any current compiler id works too, such as"rust-1.93"; the full list is at https://onlinecompiler.io/languages. - Python 3.10 or newer, and no
requestsdependency. The Django sample project is gone.
Runner shows a DeprecationWarning. To get results in the response, judge against test cases,
verify webhooks and more, move to OnlineCompiler: see the
onlinecompiler README.
Metadata
Release files for runcode 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| runcode-0.3.0.tar.gz | 5.4 kB | Without provenance | Details for runcode-0.3.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| runcode-0.3.0-py3-none-any.whl | Python 3 | none | any | Details for runcode-0.3.0-py3-none-any.whl |
Total release size: 9.9 kB
Release files / runcode-0.3.0.tar.gz
| Download URL | runcode-0.3.0.tar.gz |
|---|---|
| Size | 5.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
70878025c030e9c88e7703a68130cbe4458e1256d4f258c31930af5cf6f4121c
|
|
BLAKE2b-256 checksum How to use checksums |
1d8debcb37b875b2a4fa42d6f6efdbb463e309fdd4d4f170d8a8ce28ec8dd7eb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.12.12
|
Release files / runcode-0.3.0-py3-none-any.whl
| Download URL | runcode-0.3.0-py3-none-any.whl |
|---|---|
| Size | 4.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6769959137db9281e68e31dd496eeb3c7af7f80237d8e9006cf8db0ad0d1aaf7
|
|
BLAKE2b-256 checksum How to use checksums |
267aeb1eaaeb7692ba8146fda9eb8fb7f458ddf14b209279c7bb96615d1ff613
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.12.12
|
Security for runcode 0.3.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.