Metadata-Version: 2.5
Name: runcode
Version: 0.3.0
Summary: runcode is now onlinecompiler: this release keeps runcode.Runner working through the OnlineCompiler.io client
Project-URL: Homepage, https://onlinecompiler.io
Project-URL: Documentation, https://pypi.org/project/onlinecompiler/
Author: RunCode Inc.
License-Expression: MIT
License-File: LICENSE
Keywords: code execution,compiler api,online compiler,onlinecompiler,runcode
Classifier: Development Status :: 7 - Inactive
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Requires-Python: >=3.10
Requires-Dist: onlinecompiler>=0.1.0
Description-Content-Type: text/markdown

# runcode is now onlinecompiler

RunCode's code execution API is now [OnlineCompiler.io](https://onlinecompiler.io/?utm_source=pypi-runcode),
and its Python client is [`onlinecompiler`](https://pypi.org/project/onlinecompiler/). New code should
use it:

```bash
pip install onlinecompiler
```

```python
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`:

```python
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's
  `settings.RUNCODE_API_KEY` as before, then the `ONLINECOMPILER_API_KEY` environment variable.
- Results are POSTed to the callback URL set on your API key in the
  [dashboard](https://api.onlinecompiler.io/compilers/api-keys/), with `extra_params` echoed back.
  Set one there first: a key without a callback URL is refused. A `callback_url` passed to `Runner`
  (or `RUNCODE_CALLBACK_URL`) is not sent, and `Runner` warns.
- `execute` returns `{"status": ..., "id": ...}` for the queued run, and raises
  `onlinecompiler.OnlineCompilerError` when the run is refused (a bad key, a limit), where 0.2.1
  returned nothing.
- The old compiler ids run on current versions: `python39` on Python 3.14, `gcc49` on GCC 15,
  `cpp49` on G++ 15, `openjdk11` on OpenJDK 25, `dotnet5` on C# (.NET 10), `php81` on PHP 8.5,
  `fsharp5` on F# (.NET 10) and `ruby30` on Ruby 4.0. Python 2.7 (`python27`) is no longer offered
  and raises `ValueError`. 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 `requests` dependency. 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](https://pypi.org/project/onlinecompiler/).
