You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
573 B
Python

import mysql.connector
from BunnyCDN.Storage import Storage
username = "doadmin"
password = "AVNS_2qeFJuiGRpBQXkJjlA6"
host = "storysave-do-user-13308724-0.c.db.ondigitalocean.com"
port = 25060
database = "storysave"
sslmode = "REQUIRED"
def gen_connection():
print("Connecting to database")
newDB = mysql.connector.connect(host=host, user=username, password=password, database=database, port=port)
print("Connected to database")
return newDB, newDB.cursor()
def get_storage():
return Storage('345697f9-d9aa-4a6b-a5ec8bffc16d-ceaf-453e', 'storysave')