
    Pf                     F    d dl mZ erd dlmZmZ d Z G d d          ZdS )    )TYPE_CHECKING)PipelineRedisc                 *    ddl m}  |j        | fi |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   )r   )redis.asyncio.clientr   from_url)urlkwargsr   s      E/var/www/html/env/lib/python3.11/site-packages/redis/asyncio/utils.pyr   r      s0     +*****5>#(((((    c                   $    e Zd Zd	dZd
dZd ZdS )pipeline	redis_objr   c                 8    |                                 | _        d S N)r   p)selfr   s     r   __init__zpipeline.__init__   s    &//11r   returnr   c                    K   | j         S r   )r   )r   s    r   
__aenter__zpipeline.__aenter__   s      vr   c                 L   K   | j                                          d {V  | ` d S r   )r   execute)r   exc_type	exc_value	tracebacks       r   	__aexit__zpipeline.__aexit__   s3      fnnFFFr   N)r   r   )r   r   )__name__
__module____qualname__r   r   r    r   r   r   r      sK        2 2 2 2       r   r   N)typingr   r   r   r   r   r   r!   r   r   <module>r#      sx                544444444	) 	) 	)	 	 	 	 	 	 	 	 	 	r   