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
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.6.tar.gz
(8.6 kB
view hashes)
Built Distribution
Close
Hashes for onecompiler-1.1.6-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fb9074878da5e9080d04ec972d8903b0a1fe828be165e6d3613ebfe3c4b191be |
|
MD5 | e1ecc69714b2b5bf56bbfe9393110ed3 |
|
BLAKE2b-256 | 9c348fef00508dd3be9b323a19df341e1301d949975f6ce859bb5cdd810e8e4e |