HEX
Server: LiteSpeed
System: Linux ws4.angoweb.net 5.14.0-611.13.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 11 04:57:59 EST 2025 x86_64
User: tswangoe (2287)
PHP: 8.1.33
Disabled: show_source, system, shell_exec, passthru, exec, phpinfo, popen, proc_open
Upload Files
File: //lib/python3.9/site-packages/redis/__pycache__/utils.cpython-39.opt-1.pyc
a

��bv�@s�ddlmZddlmZmZmZmZzddlZdZWne	yJdZYn0zddl
Z
dZWne	yrdZYn0dd�Zedd	��Z
eeefed
�dd�Zd
d�Zeeefeeefd�dd�Zdd�Zdd�ZdS)�)�contextmanager)�Any�Dict�Mapping�UnionNTFcKsddlm}|j|fi|��S)z�
    Returns an active Redis client generated from the given database URL.

    Will attempt to extract the database id from the path url fragment, if
    none is provided.
    r)�Redis)Zredis.clientr�from_url)�url�kwargsr�r�//usr/lib/python3.9/site-packages/redis/utils.pyrsrccs|��}|V|��dS�N)�pipelineZexecute)Z	redis_obj�prrrrsr)�value�returncCst|t�r|jddd�S|S)Nzutf-8�replace)�errors)�
isinstance�bytes�decode�rrrr�str_if_bytes&s�rcCstt|��Sr
)�strrrrrr�safe_str,sr)�dictsrcGsi}|D]}|�|�q|S)za
    Merge all provided dicts into 1 dict.
    *dicts : `dict`
        dictionaries to merge
    )�update)rZmerged�drrr�
dict_merge0srcCst�||�Sr
)�dict�fromkeys)Zkey_list�callbackrrr�list_keys_to_dict>sr"cCs0t�}|��D]}|D]}|�|�qqt|�S)z�
    Merge all items in `res` into a list.

    This command is used when sending a command to multiple nodes
    and the result from each node should be merged into a single list.

    res : 'dict'
    )�set�values�add�list)Zcommand�res�result�vrrrr�merge_resultBs
	r*)�
contextlibr�typingrrrrZhiredisZHIREDIS_AVAILABLE�ImportErrorZcryptographyZCRYPTOGRAPHY_AVAILABLErrrrrrrr"r*rrrr�<module>s&