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.2.tar.gz
(8.7 kB
view hashes)
Built Distribution
Close
Hashes for onecompiler-1.1.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4ebaccabfac88a8065f2064d6bb8493c21d5ae8eedacc4d75d9472acacfbbaf4 |
|
MD5 | aa167357aa5ce18ce51765abc0f5fcf6 |
|
BLAKE2b-256 | 852934e3736e8d17ffa26b4e3a7e9bc50b3d43e60ac55a7fd3f723d946f5ef94 |