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.5.tar.gz
(8.7 kB
view hashes)
Built Distribution
Close
Hashes for onecompiler-1.1.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e624407ae64691d3c6f1bf34f3dc18fb7f10df00e52bd195fe6a8b197f19e7cc |
|
MD5 | b1e1482d63e32ce1eefe6057d4a9d672 |
|
BLAKE2b-256 | 592b85bef1e4c99a7a9010d54d5f94eda363e82755a4ca4e346670c6a9ec2205 |