Skip to main content

%Python Server

Define a Python gateway.


%Python Server=Python,Port,[optional fields]


%Python Server is the name of the Python gateway definition in the default CPF, but additional Python gateways with different names can be created and existing gateways can be edited or deleted as described in [Gateways]. Each definition consists of a name followed by = and then a comma-separated list of values defining the gateway; some fields are required, and others can be left blank, in which case default values are used. Fields specific to Python gateways and those that can be used with all gateways are described in the following two sections. For a more detailed description, see Python External Server Setup and Defining External Server Configurations for Python.

Python Gateway Fields

The first three fields in a Python gateway definition are common to all gateways and the next three are specific to Python gateways. These are shown in order in the following:

  • Type (required) — Type of the gateway. When defining a Python gateway, this is set to Python.

  • Port (required) — TCP port number for communication between the gateway and the proxy classes in InterSystems IRIS. This port number must not conflict with any other local TCP port on the server.

  • Resource — The gateway resource that controls access to this gateway; for %Python Server in the default CPF, this is %Gateway_SQL.


    If no resource is specified, the gateway is public, but InterSystems strongly recommends protecting all gateways using this mechanism.

  • PythonPath — Location of the Python interpreter, used in assembling the command to start the gateway on the local server.


    This field is required unless a default Python interpreter is set for the host system.

  • PythonOptions — Python options to be included in the command to start the gateway on the local server.

  • (not used) — Leave this field empty (consecutive commas).

General Gateway Fields

The remaining eight fields can be used in any gateway definition, and are shown in the General Gateway Fields section under %DotNet Server.

Changing This Parameter

For information about changing and adding gateway definitions, see [Gateways].

FeedbackOpens in a new tab