{
  "$schema" : "https://json-schema.org/draft/2020-12/schema",
  "$id" : "https://voltdb.com/voltsp/schemas/processor/python",
  "title" : "Python Processor Configuration",
  "description" : "This plugin allows execution of Python code on streamed data using the GraalVM Python engine.\n\n## Features\n\n- Execute Python code on input data\n- Load Python code from a file or provide it inline\n- Set a timeout for Python execution\n- Access input data from Python\n- Emit output data from Python\n\nThe Python processor can also be configured to limit script execution time.\n\n## Python API\n\nThe JavaScript code can access the `input` data passed to the processor.\n\nThe Python code should define a `process` function that takes the input data and returns the output data:\n\n```python\ndef process(input):\n  # Process the input data\n  return output\n```\n\n## Security Considerations\n\nThe Python processor runs with limited permissions by default. It cannot access the file system, network, or other system resources unless explicitly allowed.\n",
  "type" : "object",
  "properties" : {
    "python" : {
      "type" : "object",
      "properties" : {
        "script" : {
          "type" : "string",
          "description" : "Python code to execute"
        },
        "scriptUrl" : {
          "type" : "string",
          "format" : "uri",
          "description" : "URL to a Python file to execute"
        },
        "timeout" : {
          "type" : "string",
          "pattern" : "^(\\d+[smhd]|P(T|\\d+[YMD]).*)",
          "description" : "Maximum execution time in milliseconds",
          "default" : "1s"
        }
      },
      "additionalProperties" : false
    }
  },
  "required" : [ "python" ],
  "additionalProperties" : false
}
