Skip to main content

Execute arbitrary code from a multitude of supported languages

Project description

# PyCodeExec
Simple python library that can execute arbitrary code from supported programming languages.

# Usage

### Synchronous JavaScript
```python
from pycodeexec import Runner

javascript = Runner("javascript")
output = javascript.get_output("console.log([...Array(10)].map(i=>i*i))")

print(output)
# [ 0, 1, 4, 9, 16, 25, 36, 49, 64, 81 ]
```

### Also supports Asyncio
```python
from pycodeexec.asyncio import Runner

javascript = Runner("javascript")
await javascript.is_ready()
output = await javascript.get_output("console.log([...Array(10)].map(i=>i*i))")

print(output)
# [ 0, 1, 4, 9, 16, 25, 36, 49, 64, 81 ]

```

# Supported Languages
* Python
* JavaScript
* Ruby
* C
* More to come

# Installation
```bash
pip install pycodeexec
```

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pycodeexec-0.0.2.tar.gz (2.7 kB view details)

Uploaded Source

File details

Details for the file pycodeexec-0.0.2.tar.gz.

File metadata

  • Download URL: pycodeexec-0.0.2.tar.gz
  • Upload date:
  • Size: 2.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.19.6 CPython/3.6.4

File hashes

Hashes for pycodeexec-0.0.2.tar.gz
Algorithm Hash digest
SHA256 5d65a022784df999940955a9287aadf3d3cb4421512d2704a29bb0ee012a1570
MD5 95367f75d6155ce3c19c72b54f91b603
BLAKE2b-256 e4b7d5cd799bfb4374a0207d0f23c23e3179b217f6dd22ca494202ec2954c43f

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page