Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from sqlalchemy import create_engine
- from bikesharing_models import Base, BikeSharing, Season
- CONNECTION_STRING ="mysql+pymysql://{user}:{password}@{host}/{db}"
- eng = create_engine(
- CONNECTION_STRING.format(
- user="michal_dk", password="1234abcd", host="localhost", db="default"
- #db=pymysql.connect(host='localhost', user='michal_dk', password='1234abcd', database='todo_app')
- )
- )
- # vytvoreni vsech tabulek z models.py
- Base.metadata.create_all(eng)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement