from sqlalchemy import create_engine
engine = create_engine('mysql+mysqlconnector://usr:pass@localhost:5432/db_name')
cnx = {
'connector': 'mysql+mysqlconnector',
'user': 'usr',
'password': 'pass',
'host': 'localhost:5432',
'database': 'db_name'
}
engine = create_engine(cnx)
cnx = {
'connector': 'mysql+mysqlconnector',
'user': 'usr',
'password': 'pass',
'host': 'localhost:5432',
'database': 'db_name'
}
engine = create_engine('{connector}://{user}:{password}@{host}/{database}'.format(**cnx))