Skip to main content

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


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 details)

Uploaded Source

Built Distribution

onecompiler-1.1.6-py3-none-any.whl (11.8 kB view details)

Uploaded Python 3

File details

Details for the file onecompiler-1.1.6.tar.gz.

File metadata

  • Download URL: onecompiler-1.1.6.tar.gz
  • Upload date:
  • Size: 8.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.1 CPython/3.10.4 Linux/5.15.0-1039-azure

File hashes

Hashes for onecompiler-1.1.6.tar.gz
Algorithm Hash digest
SHA256 d6d0a114ea1d7ac629abb56a01f31843d9ab79598d724b344e69e5180983f8e6
MD5 f16ea1fe570c2095d1d95500018ff4ab
BLAKE2b-256 730a0f3aec9d23df49471ebd9ec6ea04f9fc840adb58d3bed5e8296a85aa55d6

See more details on using hashes here.

File details

Details for the file onecompiler-1.1.6-py3-none-any.whl.

File metadata

  • Download URL: onecompiler-1.1.6-py3-none-any.whl
  • Upload date:
  • Size: 11.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.1 CPython/3.10.4 Linux/5.15.0-1039-azure

File hashes

Hashes for onecompiler-1.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 fb9074878da5e9080d04ec972d8903b0a1fe828be165e6d3613ebfe3c4b191be
MD5 e1ecc69714b2b5bf56bbfe9393110ed3
BLAKE2b-256 9c348fef00508dd3be9b323a19df341e1301d949975f6ce859bb5cdd810e8e4e

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page