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.compiler(lang='js', code='console.log("Hello");')
print(res.stdout)
# Hello
res2 = compiler.compiler(lang='mysql', code='SELECT 10')
print(res2.stdout)
# 10
Project details
Release history Release notifications | RSS feed
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.4.tar.gz
(8.7 kB
view hashes)
Built Distribution
Close
Hashes for onecompiler-1.1.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0917948c2572d34f316bfaa5293d067d70265f0433812da4bd559f4583d1da28 |
|
MD5 | e9c2f2f41c6eae08fbc9315262fb1a3b |
|
BLAKE2b-256 | f4d60dbcf49a44408de9e19f00dca3f021dbdba74898454b4bca318d066ac451 |