import configparser
import os

env = "dev"

# env = "prod"


script_directory = os.path.dirname(os.path.abspath(__file__))
config_path = os.path.join(script_directory, f'application_config_{env}.ini')

config = configparser.ConfigParser()
config.read(config_path)


database_url = config['mysql']['database_url']

redis_host = config.get('redis', 'host')
redis_port = config.get('redis', 'port')
redis_db = config.get('redis', 'db')
redis_password = config.get('redis', 'password')

log_dir = config.get('log', 'dir')

datasets_url = config.get('yolo', 'datasets_url')
runs_url = config.get('yolo', 'runs_url')
detect_url = config.get('yolo', 'detect_url')
yolo_url = config.get('yolo', 'yolo_url')

images_url = config.get('images', 'image_url')
