akleemans / pyth-docker

Pyth, an extremely concise language. Try it here:

Home Page:https://pyth-docker.azurewebsites.net

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

pyth-docker

Try the updated, hosted version here: https://pyth-docker.azurewebsites.net/

See the docs: https://pyth.readthedocs.org/en/latest/

Pyth is an extremely concise language by isaacg1. This is a fork of isaacg1/pyth with the goal of providing a docker image running with an up-to-date Python version (currently 3.11) and dependencies.

Examples

Some example programs to run:

  • Hello world: "Hello, world!
  • Add two numbers: +1 1
  • Add two inputs: +Qvw
  • Check if number is prime: }QPQ
  • Echo input as output: z

Useful links:

Run the docker image

You can use the pre-built image directly: docker run -d --name pyth-docker -p 8000:8000 adrianus/pyth-docker

Build image

  • Build image: docker build --tag pyth-docker .
  • Run: docker run -d --name pyth-docker -p 8000:8000 pyth-docker

After that, open localhost:8000 in your browser to access it.

Run locally

You can use Pyth directly from the command line: python3 pyth.py -c "+1 1"

You can also run the server + UI directly using Python/Flask, without gunicorn.

  • First, install the requirements: pip3 install -r requirements.txt
  • Start it: python3 server.py
  • Then, visit localhost:5000

Run tests

To run the test suite: python3 test.py

About

Pyth, an extremely concise language. Try it here:

https://pyth-docker.azurewebsites.net

License:MIT License


Languages

Language:Python 93.3%Language:HTML 6.6%Language:Dockerfile 0.2%