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.

35 lines
1021 B
Python

9 months ago
import os
MEDIA_DIRECTORY = "media"
SNAPCHAT_DIRECTORY = "snapchat"
INSTAGRAM_DIRECTORY = "instagram"
@property
def get_instagram_directory():
return os.path.join(MEDIA_DIRECTORY, INSTAGRAM_DIRECTORY)
@property
def snapchat_output_dir():
return os.path.join(MEDIA_DIRECTORY, SNAPCHAT_DIRECTORY)
11 months ago
username = "doadmin"
11 months ago
password = "AVNS_2qeFJuiGRpBQXkJjlA6"
11 months ago
host = "storysave-do-user-13308724-0.c.db.ondigitalocean.com"
port = 25060
database = "storysave"
sslmode = "REQUIRED"
def gen_connection():
9 months ago
import mysql.connector
11 months ago
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()
11 months ago
def get_storage():
9 months ago
from BunnyCDN.Storage import Storage
return Storage('345697f9-d9aa-4a6b-a5ec8bffc16d-ceaf-453e', 'storysave')
def get_custom_storage():
from bunny import Storage
11 months ago
return Storage('345697f9-d9aa-4a6b-a5ec8bffc16d-ceaf-453e', 'storysave')