Skip to main content

A code execution engine

Project description

It's Monolith, a code execution environment. You can run code in a variety of languages (Python / Golang / Cpp / Java / Javascript), and see the output.

Should you have any questions, please don't hesitate to ask mingzhe@nus.edu.sg.

Quickstart

Installation

pip install monolith-lib

Function Calls

from monolith import monolith

monolith = monolith.Monolith(backend_url='https://monolith.cool')

# 1) Submit code to Monolith (POST)
post_response = monolith.post_code_submit(
    lang = 'python',
    libs = [],
    code = 'print("Hello, World!")',
    timeout = 10,
    profiling = False
)

# 2) Get async task_id from POST response
task_id = post_response['task_id']

# 3) Get code result from Monolith (GET)
get_response = monolith.get_code_result(task_id)
print(get_response)

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

monolith_lib-1.0.0.tar.gz (2.2 kB view details)

Uploaded Source

File details

Details for the file monolith_lib-1.0.0.tar.gz.

File metadata

  • Download URL: monolith_lib-1.0.0.tar.gz
  • Upload date:
  • Size: 2.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for monolith_lib-1.0.0.tar.gz
Algorithm Hash digest
SHA256 3c41a78d767ed33e13fbb11f4e1bd2bf459a838ddf0b1784dbccf1e2895d1702
MD5 6a8d5d00c6ad8f3ebbf39223cbb9d3b7
BLAKE2b-256 26e151b4499c2678f8f331cc30fcbc0724184825ca550371bdf4ef90f4df4214

See more details on using hashes here.

Supported by

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