Created
September 11, 2017 16:22
-
-
Save jfach/b2eb532690936ef67d432a64b8fe15be to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
db_name = _config.get('db_name') | |
connection_string = "mysql://{0}:{1}@{2}/{3}".format(username, | |
password, | |
server, | |
db_name) | |
engine = sqlalchemy.create_engine(connection_string, listeners=listeners) | |
engine.execute("CREATE DATABASE IF NOT EXISTS {0} ".format(db_name)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment