Skip to content

pokedim13/OneCompiler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Api online compilators

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages