Exemple #1
0
def main():
    db, sql = access_sql_db()
    sql.execute("drop table identifiers")
    sql.execute(""" create table identifiers (title text, firstname text, 
                midname text, lastname text, party test, twitter_id text)""")
    get_congress_members(sql)

    # Save changes.
    db.commit()
Exemple #2
0
def main():
    # Start SQLite connection.
    sql = access_sql_db()

    # Add scores to db.
    senators, reps = get_liberal_scores()
    update_sql_db(senators, reps, sql)

    # Commit changes.
    db.commit()