
    ٿh|                     L    d dl mZ d dlZd dlZd dlZd Zd Zed             ZdS )    )contextmanagerNc            	         t           j                            t           j                            t           j                            t                                        } t           j                            | dd          }t          j                    }|                    |           d|d         d         	                                |d         d         	                                |d         d         	                                |d         d         	                                |d         d	         	                                |d         d
         	                                |d         d         	                                d}|S )Nconfzpinguinite.conf	localhostDEFAULTMySQLDatabaseMySQLIDMySQLPWHomeURLDomainSiteNameAdminDirectoryOutMailServer)hostdatabaseuserpasswordr   r   r   r   )
ospathdirnameabspath__file__joinconfigparserConfigParserreadstrip)BASE_DIR	CONF_PATHconfig	ping_confs       */wd/v2025.freedom4um.com/utils/pingdata.pyget_pingconf_varsr"      s2   wrwrwx/H/HIIJJHXv/@AAI&((F
KK	 9%o6<<>>y!),22449%i06688	*?;AACC9%j17799 +,<=CCEE	*?;AACC	 	I     c                 8      fddD             }d|d<   d|d<   |S )Nc                 "    i | ]}||         S  r&   ).0kPingConfs     r!   
<dictcomp>z#get_mysql_creds.<locals>.<dictcomp>   s    TTTa1hqkTTTr#   )r   r   r   r   utf8mb4charsetutf8mb4_unicode_ci	collationr&   )r)   mysql_credss   ` r!   get_mysql_credsr0      s7    TTTT+STTTK&K	3Kr#   c              #      K   d| vrd| d<   t          j        j        di | }	 |V  |                                 d S # |                                 w xY w)Nr,   r+   r&   )mysql	connectorconnectclose)
mysqlcredsconns     r!   
open_mysqlr8   "   sf       
"" )
9?"00Z00D






s	   = A)	
contextlibr   r   r   mysql.connectorr2   r"   r0   r8   r&   r#   r!   <module>r;      s}    & % % % % % 				          $   	 	 	 	 	r#   