@classmethod<EOL><INDENT>def connect(cls, url=None, username=None, password=None, token=None,<EOL>token_file=None):<DEDENT>
auto_account = False<EOL>if url is None:<EOL><INDENT>auto_account = True<EOL>url = '<STR_LIT:/>'<EOL><DEDENT>if url.startswith('<STR_LIT:http>'):<EOL><INDENT>root_url = get_root_url(url)<EOL><DEDENT>else:<EOL><INDENT>url = URL_BASE + '<STR_LIT:/>' + url.lstrip('<STR_LIT:/>')<EOL>root_url = URL_BASE<EOL><DEDENT>auth = cls._get_token_auth(username, password, token, token_file,<EOL>root_url)<EOL>session = requests.session()<EOL>session.auth = auth<EOL>client = cls(session, url)<EOL>if auto_account:<EOL><INDENT>client = client.change_path('<STR_LIT>' %<EOL>client._get_default_account())<EOL><DEDENT>return client<EOL>
Returns an object that makes requests to the API, authenticated
with the provided username/password, at URLs beginning with `url`.

You can leave out the URL and get your 'default URL', a base path
that is probably appropriate for creating projects on your
account:

    client = LuminosoClient.connect(username=username)

If the URL is simply a path, omitting the scheme and domain, then
it will default to https://analytics.luminoso.com/api/v4/, which is
probably what you want:

    client = LuminosoClient.connect('/projects/public', username=username)

If you leave out the username, it will use your system username,
which is convenient if it matches your Luminoso username:

    client = LuminosoClient.connect()