{
  "id": "python",
  "name": "Python",
  "description": "The Python interpreter: run a script, a module or a one-line command.",
  "homepage": "https://www.python.org",
  "executables": [
    "python"
  ],
  "commands": {
    "format": 1,
    "label": "Run Python",
    "description": "Run a script, a module (-m) or a command string (-c). Choose one of script, module or command.",
    "quality": "ai-draft",
    "base": "fig:python",
    "parser": {
      "end_of_options": "--",
      "interleave": "permute",
      "long_equals": true,
      "short_attached": true,
      "short_bundles": true
    },
    "source": [
      {
        "id": "fig",
        "kind": "completion",
        "url": "https://github.com/withfig/autocomplete/blob/master/src/python.ts",
        "license": "MIT"
      }
    ],
    "field": [
      {
        "id": "script",
        "label": "Script",
        "type": "path",
        "position": 0,
        "path": {
          "kind": "file",
          "role": "input"
        },
        "sources": [
          "fig"
        ]
      },
      {
        "id": "module",
        "label": "Module (-m)",
        "type": "string",
        "option": [
          "-m"
        ],
        "suggestions": [
          {
            "value": "http.server",
            "label": "http.server"
          }
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "command",
        "label": "Command (-c)",
        "type": "string",
        "option": [
          "-c"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "interactive",
        "label": "Interactive after run",
        "type": "boolean",
        "option": [
          "-i"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "unbuffered",
        "label": "Unbuffered output",
        "type": "boolean",
        "option": [
          "-u"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "isolated",
        "label": "Isolated mode",
        "type": "boolean",
        "option": [
          "-I"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "optimize",
        "label": "Remove asserts",
        "type": "boolean",
        "option": [
          "-O"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "warnings",
        "label": "Warning control",
        "type": "string",
        "option": [
          "-W"
        ],
        "sources": [
          "fig"
        ]
      }
    ],
    "task": [
      {
        "id": "script",
        "label": "Run a script",
        "fields": [
          "script",
          "unbuffered",
          "interactive"
        ],
        "required": [
          "script"
        ]
      },
      {
        "id": "module",
        "label": "Run a module",
        "fields": [
          "module",
          "unbuffered"
        ],
        "required": [
          "module"
        ]
      },
      {
        "id": "command",
        "label": "Run a command",
        "fields": [
          "command"
        ],
        "required": [
          "command"
        ]
      }
    ],
    "group": [
      {
        "id": "basic",
        "label": "Basic",
        "fields": [
          "script",
          "module",
          "command",
          "interactive"
        ]
      },
      {
        "id": "advanced",
        "label": "Advanced",
        "fields": [
          "unbuffered",
          "isolated",
          "optimize",
          "warnings"
        ]
      }
    ]
  }
}
