Whipcode offers a REST API that enables you to run untrusted code in a secure environment using Podman. Designed as a stateless microservice, it minimizes risks associated with potential vulnerabilities. Whether you need a quick test or power through multiple languages, Whipcode makes it easy to execute your code without the hassle of traditional setup.
whipcode - A Robust REST API for Executing Untrusted Code with Podman
Explore the power of whipcode, a lightweight and scalable REST API designed for safely executing untrusted code using Podman. This microservice operates statelessly without the burden of user management or authentication, making it efficient and easy to integrate into your applications.
Key Features:
- No Hassle Hosting: If hosting isn't your thing, simply use our live endpoint available at whipcode.app.
- Diverse Language Support: Execute code written in numerous languages, including Python, JavaScript, C, C++, Rust, Go, Ruby, and many more. Here’s a glimpse at our supported languages:
Language | Environment |
---|---|
Python | cpython |
JavaScript | node.js |
C | gcc |
C++ | gcc |
Go | gccgo |
... | ... |
For a complete list, refer to our detailed languages documentation in the repository.
Seamless Interaction:
Use our API effortlessly to run your code. Here’s how you can make a request:
lang=2 # javascript
code='console.log("Hello world!");'
timeout=5
curl -s -X POST $ENDPOINT \
-H 'Content-Type: application/json' \
-H "X-Master-Key: $MASTER_KEY" \
-d '{\n "language_id": "'$lang'",\n "code": "'$(echo -n $code | base64)'",\n "timeout": "'$timeout'"\n }' | jq
The API responds with structured output, including the execution results and any standard error messages, allowing you to effectively manage and log executions.
Security First Approach:
To safeguard the service, it is essential to run the API behind a reverse proxy or API gateway. This ensures your application is protected while enforcing rate limits, policies, and authentication seamlessly. Do not operate it in production without this safety net.
Connect with Us:
For inquiries or support, feel free to reach out at hello@whipcode.app.
Dive right in and elevate your coding environment with whipcode, where performance meets security!