SQLAlchemy

References

Snippets

Raw SQL

from sqlalchemy import create_engine
engine = create_engine('''mysql+mysqlconnector://{}:{}@{}/{}'''.format(user, password, server, database)

with engine.connect() as con:
    rs = con.execute('SELECT * FROM users;')
    #data = rs.fetchone{}[0]
    data = rs.fetchall()
    print(data)