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.
group-
The
groupparameter specifies the group name of a SAM pool group. By default, the value isNone, which means the session is a single-user login. retry- The
retryparameter 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,retryis set to 1073741824 attempts. wait- The
waitparameter specifies the amount of time to wait between attempts. The time is given in seconds. By default.waitis set to 10 seconds logFile-
The
logFileparameter specifies a path, filename, or file handle where the log is written. By default,logFileis set toNone, which means no log is written.Unlike the
enableLog()method, thelogFileparameter captures log data from when a user is logging in. This is the only way to get a log of a failed login attempt. **kwarg- The
**kwargparameter 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
connectTimeoutargument specifies the number of seconds for establishing a connection before timing out. Thetimeoutargument specifies the number of seconds to keep a connection open before timing out and attempting to reconnect. reuseConnection- Specifies if the same connection is used for each transaction.
By default, the same connection is used. Set
reuseConnectionto0to specify that a new connection should be established between each transaction. lenient- 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.
ignoreSSLErrors- 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.
authentication- The TAG used for SSO login.
