Module Expr Str Import alias Import alias ImportFrom alias ImportFrom alias ImportFrom alias alias ImportFrom alias alias FunctionDef arguments args NameParam NameParam NameParam NameParam defaults Num Num Num body Expr Str If CompareLt NameLoad Num body Raise Call NameLoad BinOpMod Str TupleLoad NameLoad Assign NameStore Call NameLoad NameLoad Assign NameStore NameLoad While NameLoad body Assign NameStore Call NameLoad NameLoad NameLoad NameLoad Assign NameStore Call NameLoad BinOpMult NameLoad NameLoad NameLoad If UnaryOpNot NameLoad body Break For NameStore NameLoad body Expr Yield NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Expr Str If CompareIs NameLoad NameLoad body Assign NameStore NameLoad ClassDef bases NameLoad body FunctionDef arguments args NameParam NameParam defaults body If CompareNotIn NameLoad NameLoad body Raise Call NameLoad NameLoad Return Call NameLoad NameLoad NameLoad decorator_list Assign NameStore NameLoad FunctionDef arguments args NameParam NameParam NameParam defaults body If CompareNotIn NameLoad NameLoad body Raise Call NameLoad NameLoad Expr Call NameLoad NameLoad NameLoad NameLoad decorator_list Assign NameStore NameLoad decorator_list Return Call NameLoad decorator_list ClassDef bases NameLoad body Expr Str Assign NameStore TupleLoad Str Str FunctionDef arguments args NameParam NameParam defaults body Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults vararg kwarg body Return Call NameLoad AttributeLoad NameLoad attr NameLoad NameLoad Call NameLoad Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Return BinOpMod Str TupleLoad AttributeLoad NameLoad attr decorator_list decorator_list Assign NameStore Call NameLoad FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad NameLoad If CompareIn NameLoad NameLoad body Return SubscriptLoad NameLoad Index NameLoad If BoolOpOr UnaryOpNot Call NameLoad NameLoad Str UnaryOpNot Call NameLoad NameLoad Str body Raise Call NameLoad Str TupleLoad NameLoad If UnaryOpNot Call NameLoad NameLoad body Raise Call NameLoad BinOpMod Str TupleLoad NameLoad Assign NameStore Call NameLoad NameLoad Assign SubscriptStore NameLoad Index Call NameLoad NameLoad SubscriptStore NameLoad Index NameLoad NameLoad Return NameLoad decorator_list Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr ClassDef bases NameLoad body Expr Str Assign NameStore TupleLoad Str Str Str FunctionDef arguments args NameParam NameParam NameParam defaults body Assign AttributeStore NameLoad attr Call NameLoad NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults vararg kwarg body Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return BinOpMod Str TupleLoad AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr decorator_list decorator_list ClassDef bases NameLoad body Expr Str Assign NameStore Num Assign NameStore Num FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam defaults body If AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body TryExcept body While AttributeLoad NameLoad attr body Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr handlers ExceptHandler type NameLoad body If AttributeLoad NameLoad attr body Assign AttributeStore NameLoad attr NameLoad If CompareIs AttributeLoad NameLoad attr NameLoad body Raise Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assert AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr Assign AttributeStore NameLoad attr NameLoad decorator_list decorator_list
N/A N/A 
Helpers and wrappers for common RPyC tasks
 N/A time N/A threading rpyc.lib.colls WeakValueDict rpyc.lib.compat callable rpyc.core.consts HANDLE_BUFFITER HANDLE_CALL rpyc.core.netref syncreq asyncreq buffiter N/A N/A obj chunk max_chunk factor N/A 10 1000 2 N/A N/A Buffered iterator - reads the remote iterator in chunks starting with
    *chunk*, multiplying the chunk size by *factor* every time, as an 
    exponential-backoff, up to a chunk of *max_chunk* size.
    
    ``buffiter`` is very useful for tight loops, where you fetch an element 
    from the other side with every iterator. Instead of being limited by the 
    network's latency after every iteration, ``buffiter`` fetches a "chunk" 
    of elements every time, reducing the amount of network I/Os.
    
    :param obj: An iterable object (supports ``iter()``)
    :param chunk: the initial chunk size
    :param max_chunk: the maximal chunk size
    :param factor: the factor by which to multiply the chunk size after every 
                   iterator (up to *max_chunk*). Must be >= 1.
    
    :returns: an iterator
    
    Example::
        
        cursor = db.get_cursor()
        for id, name, dob in buffiter(cursor.select("Id", "Name", "DoB")):
            print id, name, dob
     N/A N/A factor 1 N/A N/A N/A ValueError N/A factor must be >= 1, got %r N/A factor N/A it N/A iter obj N/A count chunk N/A True N/A N/A items N/A syncreq it HANDLE_BUFFITER count N/A count N/A min N/A count factor max_chunk N/A N/A items N/A N/A N/A elem items N/A N/A N/A elem N/A restricted N/A N/A obj attrs wattrs N/A None N/A N/A Returns a 'restricted' version of an object, i.e., allowing access only to a subset of its
    attributes. This is useful when returning a "broad" or "dangerous" object, where you don't 
    want the other party to have access to all of its attributes.
    
    .. versionadded:: 3.2
    
    :param obj: any object
    :param attrs: the set of attributes exposed for reading (``getattr``) or writing (``setattr``).
                  The same set will serve both for reading and writing, unless wattrs is explicitly
                  given.
    :param wattrs: the set of attributes exposed for writing (``setattr``). If ``None``, 
                   ``wattrs`` will default to ``attrs``. To disable setting attributes completely,
                   set to an empty tuple ``()``.
    :returns: a restricted view of the object
    
    Example::
    
        class MyService(rpyc.Service):
            def exposed_open(self, filename):
                f = open(filename, "r")
                return rpyc.restricted(f, {"read", "close"})   # disallow access to `seek` or `write`
    
     N/A N/A wattrs None N/A N/A wattrs attrs Restricted N/A object N/A _rpyc_getattr N/A N/A self name N/A N/A N/A N/A name attrs N/A N/A N/A AttributeError name N/A N/A getattr obj name N/A N/A __getattr__ _rpyc_getattr _rpyc_setattr N/A N/A self name value N/A N/A N/A N/A name wattrs N/A N/A N/A AttributeError name N/A N/A setattr obj name value N/A N/A __setattr__ _rpyc_setattr N/A N/A N/A Restricted N/A _Async N/A object N/A N/A Creates an async proxy wrapper over an existing proxy. Async proxies
    are cached. Invoking an async proxy will return an AsyncResult instead of
    blocking N/A __slots__ N/A proxy __weakref__ __init__ N/A N/A self proxy N/A N/A N/A N/A self proxy proxy N/A __call__ N/A N/A self N/A args kwargs N/A N/A N/A asyncreq N/A self proxy HANDLE_CALL args N/A tuple N/A N/A kwargs items N/A __repr__ N/A N/A self N/A N/A N/A N/A async(%r) N/A N/A self proxy N/A N/A N/A _async_proxies_cache N/A WeakValueDict async N/A N/A proxy N/A N/A N/A 
    Returns an asynchronous "version" of the given proxy. Invoking the returned
    proxy will not block; instead it will return an 
    :class:`rpyc.core.async.AsyncResult` object that you can test for completion
    
    :param proxy: any **callable** RPyC proxy
    
    :returns: the proxy, wrapped by an asynchronous wrapper
    
    Example::
    
        async_sleep = rpyc.async(conn.modules.time.sleep)
        res = async_sleep(5)
    
    .. _async_note:
    
    .. note:: 
       In order to avoid overloading the GC, the returned asynchronous wrapper is 
       cached as a weak reference. Therefore, do not use::
           
           rpyc.async(foo)(5)
       
       Always store the returned asynchronous wrapper in a variable, e.g. ::
       
           a_foo = rpyc.async(foo)
           a_foo(5)
     N/A pid N/A id proxy N/A N/A pid _async_proxies_cache N/A N/A N/A _async_proxies_cache N/A pid N/A N/A N/A N/A hasattr proxy ____conn__ N/A N/A hasattr proxy ____oid__ N/A N/A N/A TypeError 'proxy' must be a Netref: %r N/A proxy N/A N/A N/A callable proxy N/A N/A N/A TypeError N/A 'proxy' must be callable: %r N/A proxy N/A caller N/A _Async proxy N/A N/A _async_proxies_cache N/A N/A id caller N/A _async_proxies_cache N/A pid caller N/A caller N/A N/A N/A async __doc__ N/A _Async __doc__ timed N/A object N/A N/A Creates a timed asynchronous proxy. Invoking the timed proxy will
    run in the background and will raise an :class:`rpyc.core.async.AsyncResultTimeout` 
    exception if the computation does not terminate within the given time frame
    
    :param proxy: any **callable** RPyC proxy
    :param timeout: the maximal number of seconds to allow the operation to run
    
    :returns: a ``timed`` wrapped proxy
    
    Example::
    
        t_sleep = rpyc.timed(conn.modules.time.sleep, 6) # allow up to 6 seconds
        t_sleep(4) # okay
        t_sleep(8) # will time out and raise AsyncResultTimeout
     N/A __slots__ N/A __weakref__ proxy timeout __init__ N/A N/A self proxy timeout N/A N/A N/A N/A self proxy N/A async proxy N/A N/A self timeout timeout N/A __call__ N/A N/A self N/A args kwargs N/A N/A res N/A N/A self proxy args kwargs N/A N/A N/A res set_expiry N/A self timeout N/A res N/A __repr__ N/A N/A self N/A N/A N/A N/A timed(%r, %r) N/A N/A N/A self proxy proxy N/A self timeout N/A N/A BgServingThread N/A object N/A N/A Runs an RPyC server in the background to serve all requests and replies
    that arrive on the given RPyC connection. The thread is started upon the
    the instantiation of the ``BgServingThread`` object; you can use the 
    :meth:`stop` method to stop the server thread
    
    Example::
    
        conn = rpyc.connect(...)
        bg_server = BgServingThread(conn)
        ...
        bg_server.stop()
        
    .. note:: 
       For a more detailed explanation of asynchronous operation and the role of the 
       ``BgServingThread``, see :ref:`tut5`
    
     N/A SERVE_INTERVAL 0.0 N/A SLEEP_INTERVAL 0.1 __init__ N/A N/A self conn callback N/A None N/A N/A N/A self _conn conn N/A N/A self _thread N/A N/A threading Thread target N/A self _bg_server N/A N/A N/A N/A self _thread setDaemon True N/A N/A self _active True N/A N/A self _callback callback N/A N/A N/A N/A self _thread start N/A __del__ N/A N/A self N/A N/A N/A N/A self _active N/A N/A N/A N/A self stop N/A _bg_server N/A N/A self N/A N/A N/A N/A N/A N/A self _active N/A N/A N/A N/A N/A self _conn serve N/A self SERVE_INTERVAL N/A N/A N/A time sleep N/A self SLEEP_INTERVAL N/A N/A N/A Exception N/A N/A N/A self _active N/A N/A N/A self _active False N/A N/A N/A self _callback None N/A N/A N/A N/A N/A self _callback N/A stop N/A N/A self N/A N/A N/A stop the server thread. once stopped, it cannot be resumed. you will
        have to create a new BgServingThread object later. N/A N/A self _active N/A N/A self _active False N/A N/A N/A N/A self _thread join N/A N/A self _conn None N/A N/A