init commit
This commit is contained in:
10
test_db.py
Normal file
10
test_db.py
Normal file
@@ -0,0 +1,10 @@
|
||||
# test_db.py
|
||||
from sqlalchemy import create_engine
|
||||
from sqlalchemy.orm import sessionmaker
|
||||
|
||||
# Замените на ваш URL
|
||||
engine = create_engine("mysql+pymysql://autopost:3ZuanIFHPFLDgxc7CZTMMhjhxf1d4H4P9wU1jT86a8178Pgssh@localhost:3306/autopost")
|
||||
Session = sessionmaker(bind=engine)
|
||||
session = Session()
|
||||
print("Connected successfully!")
|
||||
session.close()
|
||||
Reference in New Issue
Block a user