def register_connection(self, alias, api_key, base_url, timeout=5):
        """
        Create and register a new connection.

        :param alias:   The alias of the connection. If not changed with `switch_connection`,
                        the connection with default 'alias' is used by the resources.
        :param api_key: The private api key.
        :param base_url: The api url including protocol, host, port (optional) and location.
        :param timeout: The time in seconds to wait for 'connect' and 'read' respectively.
                        Use a tuple to set these values separately or None to wait forever.
        :return:
        """
        if not base_url.endswith('/'):
            base_url += '/'

        self._connections[alias] = Connection(api_key, base_url, timeout)