o
    Ug                     @   sh   d dl mZ d dlmZmZ eZG dd deZdZda	dd Z
d	d
 Zdd Zd dlmZ ee dS )    )__version__)IFailedFutureILoggerc                   @   s   e Zd ZdZdZdS )_Configa  
    This holds all valid configuration options, accessed as
    class-level variables. For example, if you were using asyncio:

    .. sourcecode:: python

        txaio.config.loop = asyncio.get_event_loop()

    ``loop`` is populated automatically (while importing one of the
    framework-specific libraries) but can be changed before any call
    into this library. Currently, it's only used by :meth:`call_later`
    If using asyncio, you must set this to an event-loop (by default,
    we use asyncio.get_event_loop). If using Twisted, set this to a
    reactor instance (by default we "from twisted.internet import
    reactor" on the first call to call_later)
    N)__name__
__module____qualname____doc__loop r   r   Z/var/www/html/Testing_prj/Navya-Bakers/venv/lib/python3.10/site-packages/txaio/__init__.pyr   &   s    r   )!with_configusing_twistedusing_asynciouse_twisteduse_asyncioconfigcreate_futurecreate_future_successcreate_future_errorcreate_failure	as_future	is_futurerejectresolvecanceladd_callbacksgather	is_called
call_laterfailure_messagefailure_tracebackfailure_format_tracebackmake_batched_timermake_loggerstart_loggingset_global_log_levelget_global_log_leveladd_log_categoriesr   r   sleeptime_nsperf_counter_nsNc                  C   N   t d urt dkrtdt da ddlm}  t|  dd l}d|_d|_d S )NtwistedExplicitly using '{}' alreadyr   )txTF)_explicit_frameworkRuntimeErrorformattxaior/   _use_frameworkr   r   )r/   r3   r   r   r   r   k      
r   c                  C   r,   )Nasyncior.   r   )aioFT)r0   r1   r2   r3   r7   r4   r   r   )r7   r3   r   r   r   r   w   r5   r   c                 C   s2   ddl }tD ]}|dv rqt||t| | qdS )zc
    Internal helper, to set this modules methods to a specified
    framework helper-methods.
    r   N)r   r   )r3   __all__setattrgetattr)moduler3   method_namer   r   r   r4      s   r4   )_unframework)txaio._versionr   txaio.interfacesr   r   versionobjectr   r8   r0   r   r   r4   r3   r=   r   r   r   r   <module>   s   -