Metadata-Version: 2.1
Name: runcode
Version: 0.2
Summary: RunCode Python API
Home-page: https://github.com/runcode-io/runcode-python
Author: RunCode
Author-email: hello@runcode.io
License: UNKNOWN
Platform: UNKNOWN
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Topic :: Software Development :: Internationalization
Description-Content-Type: text/markdown
License-File: LICENSE

# RunCode Python API

This API is as simaple as send your code and getting execution result. 

Install 

```
pip install runcode
```



## Python Example
```
from runcode import Runner

runner = Runner(
    api_key="",
    callback_url="",
)

runner.execute(
        code="""
print("Hello world")
start = input()
end = input()
for i in range(int(start), int(end)):
    print(i)
""",
        input="1\n10",
        compiler=Runner.python39,
    )
    
```
You need to provide two parameters here.  
api_key - you will get it from runcode.io dashboard after loging.  
callback_url - Your application URL to process execution result.  
compiler - You can choose any of the available compilers from RunCode docs.
## Django Example
```
from runcode import Runner

runner = Runner()

runner.execute(
        code="""
print("Hello world")
start = input()
end = input()
for i in range(int(start), int(end)):
    print(i)
""",
        input="1\n10",
        compiler=Runner.python39,
    )
```
You need to specify compiler here.
compiler - You can choose any of the available compilers from RunCode docs.

You need to add two parameters to settings.py file.

RUNCODE_API_KEY - you will get it from runcode.io dashboard after loging.  
RUNCODE_CALLBACK_URL - Your application URL to process execution result. 

### Available compilers
```
python39 = "python-3.9.7"
gcc49 = "gcc-4.9"
cpp49 = "g++-4.9"
openjdk11 = "openjdk-11"
dotnet5 = "dotnet-5"
python27 = "python-2.7.18"
php81 = "php-8.1"
fsharp5 = "fsharp-5"
ruby30 = "ruby-3.0.2"
```


For further support, contact hello@runcode.io 


