def download_files(file_list):
    """Download the latest data. """
    for _, source_data_file in file_list:
        sql_gz_name = source_data_file['name'].split('/')[-1]
        msg = 'Downloading: %s' % (sql_gz_name)
        log.debug(msg)

        new_data = objectstore.get_object(
            handelsregister_conn, source_data_file, 'handelsregister')

        # save output to file!
        with open('data/{}'.format(sql_gz_name), 'wb') as outputzip:
            outputzip.write(new_data)
def download_files ( file_list ) : for _ , source_data_file in file_list : sql_gz_name = source_data_file [ 'name' ] . split ( '/' ) [ - 1 ] msg = 'Downloading: %s' % ( sql_gz_name ) log . debug ( msg ) new_data = objectstore . get_object ( handelsregister_conn , source_data_file , 'handelsregister' ) with open ( 'data/{}' . format ( sql_gz_name ) , 'wb' ) as outputzip : outputzip . write ( new_data )
Download the latest data.