Optional Parameters

The Session object can also take a number of optional parameters.

The Session object:

Session(url, username, password, logintype, group=None, retry=1073741824, wait=10, logfile=None, **kwargs, authentication=TAG)

contains four parameters, url, username, password, and logintype, that are required to establish a 1010data Insights Platform session. For more information, see Establishing a session. It also contains a number of optional parameters, including group, retry, wait, and logfile.


The group parameter specifies the group name of a SAM pool group. By default, the value is None, which means the session is a single-user login.

The retry parameter specifies the number of times that the application attempts to get a user ID from a SAM pool to log in before quitting. By default, retry is set to 1073741824 attempts.
The wait parameter specifies the amount of time to wait between attempts. The time is given in seconds. By default. wait is set to 10 seconds

The logFile parameter specifies a path, filename, or file handle where the log is written. By default, logFile is set to None, which means no log is written.

Unlike the enableLog() method, the logFile parameter captures log data from when a user is logging in. This is the only way to get a log of a failed login attempt.

The **kwarg parameter is a Python variable enabling you to pass keyword arguments into a function. These named parameters include, but are not limited to:
timeout(connectTimeout, timeout)
Sets the connection timeout parameters. The connectTimeout argument specifies the number of seconds for establishing a connection before timing out. The timeout argument specifies the number of seconds to keep a connection open before timing out and attempting to reconnect.
Specifies if the same connection is used for each transaction. By default, the same connection is used. Set reuseConnection to 0 to specify that a new connection should be established between each transaction.
Sets a default type for non-conforming columns to be cast to. By default, the column is not re-cast and the system returns an error. For example, if your query requests an integer column and a float column is returned, lenient can cast that column to the intended data type.
Specifies whether or not to ignore an SSL error. By default, this parameter is set to FALSE, which means an SSL error results in a failed log in attempt.

This is useful for debugging or during development, because you may want to ignore any SSL errors when logging in.

The TAG used for SSO login.