Skip to main content

%Python Server

Define a Python Gateway.


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

%Python Server is the definition of a Python Gateway. ServerIP and Port are required fields. All the comma-separated fields are described below.


The [Gateways] section of the configuration parameter file contains entries for each External Language Gateway configured on the InterSystems IRIS® data platform instance. Each entry contains a comma-separated list of values defining a Gateway Server. Some fields are required, and default values are used for blank fields.

The fields for a Python Gateway, in order, are as follows:

  1. Type (required) — Type of the Gateway Server. When the Gateway is for Python, this is set to Python.

  2. Server (required) — IP address or name of the machine where the Gateway Server executable is located. The maximum length is 256 characters; is the default.

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

  4. PythonPath (required*) — Location of the Python executable, used to get the command to start the Gateway.

    * This field may be left blank if a default Python interpreter is set for the machine.

  5. PythonOptions — Optional arguments to be passed to the Python interpreter, used in the command to start the Gateway.

  6. Not used

  7. LogFile — Full pathname of the file used to log all communication between InterSystems IRIS and the Gateway Server. This optional property should only be used when debugging. The maximum length is 1023 characters.

  8. UseSharedMemory — Whether to use shared memory for connection if available. The default is 1 (use shared memory).

  9. AllowedIpAddresses (only used for .NET Gateways) — IP address of the local network adapter to which the server listens. Specify to listen on all IP addresses local to the machine (, VPN address, etc.). You can also specify a single existing local IP address to restrict the listener to that IP address. is the initial expression.

  10. UsePassphrase — Whether the Gateway requires a passphrase for connection on startup. The default is 0 (do not use passphrase).

  11. ConnectionTimeout — Number of seconds to wait for a connection to be established with the Gateway Server. The range is 2-300; the default value is 5.

  12. HeartbeatFailureAction — Action to take if the Object Gateway goes into a failure state. The default is R. Valid values are:

    • N – No action.

    • R – Restart the Gateway Server.

    • A – Generate an Alert entry in the Interoperability event log.

    • RA – Restart and generate an alert.


    If Server points to a remote system, this feature can't be set to restart the Server.

  13. HeartbeatFailureTimeout — Number of seconds to wait for a heartbeat response before deciding that the Gateway Server is in failure state. If this value is smaller than HeartbeatInterval, the Gateway Server is in failure state every time the communication check fails. The range is 0–86400 (1 day); the default is 30.

  14. HeartbeatInterval — Number of seconds between each communication with the Gateway Server to check whether it is active. A value of 0 disables the heartbeat and related Heartbeat settings. When enabled, valid values are from 5 to 3600 seconds (1 hour); the default is 10 seconds.

  15. HeartbeatFailureRetry — Number of seconds to wait before retrying the HeartbeatFailureAction when the Gateway Server is in a failure state. A value of 0 disables this retry, meaning that once there is a failure that cannot be immediately recovered, there are no attempts at automatic recovery. When enabled, valid values are from 1 to 86400 (24 hours); the default is 300 seconds (5 minutes).

  16. InitializationTimeout — Number of seconds to wait for a response during initialization of the Gateway Server. The range is 2-300; the default value is 5.

Changing This Parameter

On the External Language Servers page of the Management Portal (System Administration > Configuration > Connectivity > External Language Servers), click %Python Server to edit this Gateway. You can also click Create External Language Server to create a new Python Gateway.

Instead of using the Management Portal, you can change %Python Server in the Config.GatewaysOpens in a new tab class (as described in the class reference) or by editing the CPF in a text editor (as described in the Editing the Active CPF section of the “Introduction to the Configuration Parameter File” chapter in this book).

FeedbackOpens in a new tab