def __init__(self, inidate, enddate, region, coordinates=None, platform='Sentinel-2', producttype='S2MSI1C', cloud=100, output_path=None):
    self.session = requests.Session()
    self.inidate = inidate
    self.enddate = enddate
    self.coord = coordinates
    self.producttype = producttype
    self.platform = platform
    self.region = region
    self.cloud = int(cloud)
    if output_path:
        self.output_path = os.path.join(output_path, self.region)
    else:
        path = config.get_data_path()
        self.output_path = os.path.join(path, self.region)
    if (not os.path.isdir(self.output_path)):
        os.mkdir(self.output_path)
    self.api_url = 'https://scihub.copernicus.eu/apihub/'
    self.credentials = config.load_credentials()['sentinel']
def __init__(self, inidate, enddate, region, coordinates=None, platform='Sentinel-2', producttype='S2MSI1C', cloud=100, output_path=None):
    self.session = requests.Session()
    self.inidate = inidate
    self.enddate = enddate
    self.coord = coordinates
    self.producttype = producttype
    self.platform = platform
    self.region = region
    self.cloud = int(cloud)
    if output_path:
        self.output_path = os.path.join(output_path, self.region)
    else:
        path = config.get_data_path()
        self.output_path = os.path.join(path, self.region)
    if (not os.path.isdir(self.output_path)):
        os.mkdir(self.output_path)
    self.api_url = 'https://scihub.copernicus.eu/apihub/'
    self.credentials = config.load_credentials()['sentinel']