Skip to main content

No project description provided

Project description

OneCompiler

Compilation of many languages in Python!


Mini documentation

Installing the library

> pip install onecompiler

Import

from onecompiler import Compiler	# Sync
from onecompiler import AsyncCompiler	# Async

Initialization

compiler = Compiler()

Get a list of available languages

print( compiler.all_languages )

Languages are compiled through the Compiler attribute or using compiler.to.lang
» For query languages compiler.query.lang

Example

# Sample JavaScript code
res = compiler.to.js('console.log("Hello");')
print(res.stdout)
# Hello

# Sample MySQL code
res2 = compiler.query.mysql('SELECT 10')
print(res2.stdout)
# 10

Or

res = compiler.compile(lang='js', code='console.log("Hello");')
print(res.stdout)
# Hello

res2 = compiler.compile(lang='mysql', code='SELECT 10')
print(res2.stdout)
# 10

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

onecompiler-1.1.6.tar.gz (8.6 kB view hashes)

Uploaded Source

Built Distribution

onecompiler-1.1.6-py3-none-any.whl (11.8 kB view hashes)

Uploaded Python 3

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