Skip to content
HALOWERK

Codewerk

python run

Executes Python 3.12 with its standard library in an empty, read-only Linux rootfs under a fresh unprivileged DynamicUser. Only /usr and the fixed worker are mounted, no application state or credentials. Networking is disabled both by a private network namespace and address-family restrictions; the environment is empty. Input is exposed as input_data, the final expression is the JSON result, and the working directory /tmp/output provides up to eight small generated files returned as base64..

POST https://code.halowerk.com/v1/python-run

Inputs

Fields of the published input schema
FieldTypeRequiredDescription
codestringYesPython script; the last expression is returned.
inputSee schemaNoOptional JSON value exposed as input_data.
Show full input schema
{
  "type": "object",
  "additionalProperties": false,
  "required": [
    "code"
  ],
  "properties": {
    "code": {
      "type": "string",
      "minLength": 1,
      "maxLength": 32000,
      "description": "Python script; the last expression is returned."
    },
    "input": {
      "description": "Optional JSON value exposed as input_data."
    }
  }
}

Open original schema

Published input example

{
  "code": "sum(input_data[\"prices\"])",
  "input": {
    "prices": [
      12,
      8,
      5
    ]
  }
}

Result & documentation

Machine-readable documentation of this hub

Source of this page: the published HALOWERK catalog. Updated: 2026-11-17 UTC.

More endpoints in this hub

All endpoints in this hub โ†’