(db, limit, target)
Download changes to a target file-like object
Download changes to a target file-like object
Download changes to a target file - like object
def download_changes(db, limit, target):
    """
    Download changes to a target file-like object
    """
    writer = csv.writer(target, dialect=csv.excel)
    # headings
    keys = [
        'domain',
        'doc_type',
        'date',
        'id',
        'rev',
    ]
    writer.writerow(keys)
    for row in get_recent_changes(db, limit):
        writer.writerow([row[k] for k in keys])
def download_changes ( db , limit , target ) : writer = csv . writer ( target , dialect = csv . excel ) # headings keys = [ 'domain' , 'doc_type' , 'date' , 'id' , 'rev' , ] writer . writerow ( keys ) for row in get_recent_changes ( db , limit ) : writer . writerow ( [ row [ k ] for k in keys ] )