def __init__(
        self,
        domain,
        username=None,
        password=None,
        auth=None,
        virtual_dir="RaveWebServices",
    ):
        """
        Create a connection to Rave

        :param str domain: Rave URL Name
        :param str username: Rave User Login
        :param str password: Rave User password
        :param str auth: Authentication tuple (usually something like `(username, password)`
        :param str virtual_dir: Name of the Rave Web Services prefix (usually `RaveWebServices`, but can be customised)

        .. note::
            If the `domain` does not start with http then it is assumed to be the name of the Medidata
            url and https:// will be added as a prefix and .mdsol.com will be added as a postfix.

            * innovate => https://innovate.mdsol.com
            * http://mytest => http:/mytest

        """

        if domain.lower().startswith("http"):
            self.domain = domain
        else:
            self.domain = "https://%s.mdsol.com" % domain

        self.auth = None
        if auth is not None:
            self.auth = auth
        elif username is not None and password is not None:
            # Make a basic auth
            self.auth = (username, password)

        self.base_url = make_url(self.domain, virtual_dir)

        # Keep track of results of last request so users can get if they need.
        self.last_result = None

        # Time taken to process last request
        self.request_time = None
def __init__ ( self , domain , username = None , password = None , auth = None , virtual_dir = "RaveWebServices" , ) : if domain . lower ( ) . startswith ( "http" ) : self . domain = domain else : self . domain = "https://%s.mdsol.com" % domain self . auth = None if auth is not None : self . auth = auth elif username is not None and password is not None : self . auth = ( username , password ) self . base_url = make_url ( self . domain , virtual_dir ) self . last_result = None self . request_time = None
Create a connection to Rave

        :param str domain: Rave URL Name
        :param str username: Rave User Login
        :param str password: Rave User password
        :param str auth: Authentication tuple (usually something like `(username, password)`
        :param str virtual_dir: Name of the Rave Web Services prefix (usually `RaveWebServices`, but can be customised)

        .. note::
            If the `domain` does not start with http then it is assumed to be the name of the Medidata
            url and https:// will be added as a prefix and .mdsol.com will be added as a postfix.

            * innovate => https://innovate.mdsol.com
            * http://mytest => http:/mytest