o
    i                     @   sL   d dl mZmZ erd dlmZmZ dededdfddZG d	d
 d
ZdS )    )TYPE_CHECKINGAny)PipelineRedisurlkwargsreturnr   c                 K   s   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)r   r   r    r   G/home/ubuntu/.local/lib/python3.10/site-packages/redis/asyncio/utils.pyr
      s   r
   c                   @   s(   e Zd ZdddZdddZd	d
 ZdS )pipeline	redis_objr   c                 C   s   |  | _d S N)r   p)selfr   r   r   r   __init__   s   zpipeline.__init__r   r   c                    s   | j S r   )r   )r   r   r   r   
__aenter__   s   zpipeline.__aenter__c                    s   | j  I d H  | ` d S r   )r   execute)r   exc_type	exc_value	tracebackr   r   r   	__aexit__   s   zpipeline.__aexit__N)r   r   )r   r   )__name__
__module____qualname__r   r   r   r   r   r   r   r      s    

r   N)	typingr   r   r	   r   r   strr
   r   r   r   r   r   <module>   s
    