Allow user to code Python using Json syntax.
This project allows users to code Python using Json syntax. It is a web server that receive, compile, and run pyJson code. The server is built using FastAPI and the code is compiled and run using Python subprocess module.
You can install this project with 2 methods:
- Clone this repository and run the server locally.
- Install using Docker.
- Clone this repository
- Install the dependencies
pip install -r requirements.txt
- Run the server at port 8000
uvicorn app:app --port 8000
- Ensure that Docker is installed on your machine.
- Pull the image from Docker Hub
docker pull ball2004244/pyjson-compiler
- Run the image
docker run -d -p 8000:8000 ball2004244/pyjson-compiler
Send a POST request to the server with the following body:
{
"code": {
"print": "'Hello World!'",
"print2": "'I am PyJSON'"
},
"filename": "code.py"
}
Output:
Hello World!
I am PyJSON
Keyword | Description | Example |
---|---|---|
Print a string to console | print('Hello World') |
This part is under construction!
See Config for more details.
This project is licensed under the MIT License - see the LICENSE file for details.
- File Read/Write Support
- Variable/Constant
- Maths Operation
- Data Type