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.3.tar.gz
(8.7 kB
view hashes)
Built Distribution
Close
Hashes for onecompiler-1.1.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1789568a32fdb4cd642bdf12fda2f5a8dbfe55fe6b056399dfdd4e6b42df8291 |
|
MD5 | 4dace445727421af5814f52a627082b6 |
|
BLAKE2b-256 | 8f36d8c4cae9217a43c4462bdac86d567d399bdf51ac5c81aa2b24ad9b5857fd |