def __init__(self, **kwargs):

        logger.debug(kwargs)

        for key, value in kwargs.items():
            setattr(self, key, value)

        self.ft_headers = None

        self.csv_latlng_suffix = "_latlng_%04x.csv" % random.getrandbits(16)

        # base
        auth = GDAuth()
        creds = auth.get_credentials()
        self.auth_user = creds.id_token.get("email", None)
        if creds is None:
            raise Exception("Failed to retrieve credentials")
        self.http = auth.get_authorized_http()

        base = GDBase()

        self.file_id = None
        if self.replace_id:
            self.file_id = base.get_id_from_url(self.replace_id)

        self.service = base.get_drive_service(self.http)
        self.root = base.get_root()

        # ft service
        if self.target_type == "ft":
            self.ft_service = base.get_ft_service(self.http)

        # get file size
        self.local_size = os.path.getsize(self.source_file)
dataset/ETHPy150Open tienfuc/gdcmdtools/gdcmdtools/put.py/GDPut.__init__/original