| Current Path : /var/www/cesa.co.za/python/__pycache__/ |
| Current File : /var/www/cesa.co.za/python/__pycache__/config.cpython-311.pyc |
�
z<Ri+ � � � d Z ddlZddlmZ ddlmZmZ ddlmZ ed� � ed� � n# e $ r e
d� � Y nw xY w ee� � j Z
ej d d
� � e ej dd� � � � ej d
d� � ej dd� � ej dd� � � � � dk ej dd� � � � � dk ej dd� � � � � dk ej dd� � ej dd� � d� Z ej dd� � e ej dd� � � � e ej dd � � � � e ej d!d"� � � � d#�Z ej d$d%� � ej d&d'� � d(d)�Zd
d*d+d,d+d-d.�d/d*d+d,d+d0d.�d1d*d+d,d+d2d.�d3d4d,d,d,d5d.�d6�ZdCd7ed8eeef fd9�Zd8eeef fd:�Zd8eeef fd;�Zd<� Zed=k rg e� � Z e
d>e� �� � e
d?� � e
d@ e� � � �� � e
dA e� � � �� � e
dB e� � � �� � dS dS )Dz�
Configuration file for Python applications
This file contains configuration settings for the Python mail service
and other applications, independent of the Symfony app.
� N)�Path)�Dict�Any)�load_dotenvz
.env.localz.envz8dotenv not supported or installed, continuing without it�MAIL_SMTP_HOSTzsmtp.gmail.com�MAIL_SMTP_PORT�587�MAIL_SMTP_USERNAMEzyour-email@gmail.com�MAIL_SMTP_PASSWORDzyour-app-password�MAIL_SMTP_USE_TLS�true�MAIL_SMTP_USE_SSL�false�MAIL_SMTP_AUTH_REQUIRED�MAIL_FROM_EMAILznoreply@yourdomain.com�MAIL_FROM_NAMEzPython Mail Service) � smtp_host� smtp_port�
smtp_username�
smtp_password�use_tls�use_ssl�
auth_required�
from_email� from_name�SERVER_MONITOR_ALERT_EMAILzserver-admin@igot.africa�SERVER_MONITOR_DISK_THRESHOLDz85.0�SERVER_MONITOR_MEMORY_THRESHOLDz10.0�SERVER_MONITOR_CPU_THRESHOLDz1.5)�alert_email�disk_threshold�memory_threshold�
cpu_threshold� LOG_LEVEL�INFO�LOG_FILEzpython-app.logz4%(asctime)s - %(name)s - %(levelname)s - %(message)s)�level�file�formatiK TFz&Requires App Password for 2FA accounts)r r r r r �notezsmtp-mail.outlook.comz&Standard Outlook/Hotmail configurationzsmtp.mail.yahoo.comzYahoo Mail configurationzmail.yourdomain.com� z Custom SMTP server configuration)�gmail�outlook�yahoo�custom�provider�returnc � � | rD| t v r;t � � � }|� t | � � |S t � � � S )z�
Get mail configuration, optionally overriding with a specific provider.
Args:
provider: Provider name from MAIL_PROVIDERS, or None for current config
Returns:
Dict containing mail configuration
)�MAIL_PROVIDERS�MAIL_CONFIG�copy�update)r0 �configs �$/var/www/cesa.co.za/python/config.py�get_mail_configr9 ^ sU � � � �H��.�.��!�!�#�#���
�
�n�X�.�/�/�/��
������� c �4 � t � � � S )z$Get server monitoring configuration.)�SERVER_MONITOR_CONFIGr5 � r: r8 �get_server_monitor_configr>