403Webshell
Server IP : 185.11.201.71  /  Your IP : 192.168.7.18
Web Server : Apache/2.4.29 (Ubuntu)
System : Linux tech-virtual-machine 4.15.0-213-generic #224-Ubuntu SMP Mon Jun 19 13:30:12 UTC 2023 x86_64
User : tech ( 1000)
PHP Version : 7.4.28
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
MySQL : OFF  |  cURL : OFF  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /comunica/app_ojos_old/app/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /comunica/app_ojos_old/app/config.py
"""
conf.py

Description: Configuration settings based on environment variables.

Last Updated: 2024-08-07
Version: 1.0.0
Copyright (c) 2024 Tech-Impulse, Gerard Lahuerta
License: MIT License (see LICENSE for more details)
"""

#################################################################################################################################

from dotenv import load_dotenv
import os
import pandas as pd

#################################################################################################################################

load_dotenv()

#################################################################################################################################

# Constantes de direccion del puerto y api
DEBUG = os.getenv("DEBUG", "True").lower() in ("true", "1", "t")

if DEBUG:
    HOST = os.getenv("DEBUG_HOST", "127.0.0.1")
    PORT = int(os.getenv("DEBUG_PORT", 8000))
else:
    HOST = os.getenv("PROD_HOST", "0.0.0.0")
    PORT = int(os.getenv("PROD_PORT", 80))

# Constantes de conexion con la BBDD
MYSQL_USER = os.getenv('MYSQL_USER', 'root')
MYSQL_PASSWORD = os.getenv('MYSQL_PASSWORD', 'password')
MYSQL_HOST = os.getenv('MYSQL_HOST', 'localhost')
MYSQL_PORT = os.getenv('MYSQL_PORT', '3306')
MYSQL_DB = os.getenv('MYSQL_DB', 'test_db')

SQL_DATABASE_URL = f"mysql+pymysql://{MYSQL_USER}:{MYSQL_PASSWORD}@{MYSQL_HOST}:{MYSQL_PORT}/{MYSQL_DB}"
CONN_SQL_SERVER = f"mysql+pymysql://{MYSQL_USER}:{MYSQL_PASSWORD}@{MYSQL_HOST}:{MYSQL_PORT}"

# Constantes generales
API_VERSION = "1.0.0"
PROJECT_NAME = "Colorimetry WebApp"

# Rutas definidas
DATA = "data"
TEMP = "temp"

# Datos para colorimetria
SCALE_FILE = "app/docs/scale.xlsx"
MAX_LEVEL = pd.read_excel(SCALE_FILE, skiprows=1, engine='openpyxl').shape[0]

# Otros valores constantes
LEFT = 0
RIGHT = 1

Youez - 2016 - github.com/yon3zu
LinuXploit