def __init__(self, id, key, secret, url):
        """ 
            constructer initializes the DS creds and creates passkey.
            Parses the url recieved from user.
        """
        u = urlparse(url)

        self.url = "https://" + u.netloc + u.path + "/"
        passkey = key + ":" + secret
        self.id = id
        self.b64val = base64.b64encode(bytes(passkey, 'utf-8')).decode("ascii")
        self.session = requests.Session()
        self.session.headers.update({
            "Authorization": "Basic %s" % self.b64val,
            "searchlight-account-id": "%s" % self.id,
            "User-Agent": "DigitalShadowsAzureSentinelIntegration"
        })

        # Add retry logic to the session object
        retries = Retry(
            total=3,
            status_forcelist=frozenset({429, 500, 502, 503, 504}),
            allowed_methods=["HEAD", "GET", "PUT", "DELETE", "OPTIONS", "TRACE", "POST"],
            backoff_factor=1,
            raise_on_status=False,
            connect=3,
            read=2,
        )
        adapter = HTTPAdapter(max_retries=retries)
        self.session.mount("https://", adapter)
 
            constructer initializes the DS creds and creates passkey.
            Parses the url recieved from user.
        
Solutions/Digital Shadows/Data Connectors/Digital Shadows/DigitalShadowsConnectorAzureFunction/DS_api.py