mysqlx.get_session

mysqlx.get_session(*args: Any, **kwargs: Any) Session

Creates a Session instance using the provided connection data.

Parameters:
  • *args – Variable length argument list with the connection data used to connect to a MySQL server. It can be a dictionary or a connection string.

  • **kwargs – Arbitrary keyword arguments with connection data used to connect to the database.

Returns:

Session object.

Return type:

mysqlx.Session