Module Import alias Import alias ImportFrom alias Assign NameStore ListLoad Str ClassDef bases NameLoad body Expr Str Assign NameStore NameLoad FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body If UnaryOpNot Call AttributeLoad NameLoad attr body Raise Call NameLoad BinOpMod Str NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr BoolOpOr NameLoad Call NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Dict Assign AttributeStore NameLoad attr Dict decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Dict Assign NameStore ListComp ListLoad NameLoad comprehension NameStore Call NameLoad AttributeLoad NameLoad attr While NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Num If Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Num body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign SubscriptStore NameLoad Index Call NameLoad NameLoad Dict Str Str Call AttributeLoad NameLoad attr NameLoad Call AttributeLoad NameLoad attr NameLoad If Call AttributeLoad NameLoad attr NameLoad body For NameStore Call NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr BinOpAdd NameLoad ListLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Return UnaryOpNot Call AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If CompareLt AttributeLoad NameLoad attr TupleLoad Num body Return Call NameLoad NameLoad orelse Return Call NameLoad NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Return Call NameLoad NameLoad Str decorator_list FunctionDef arguments args NameParam defaults body Return BinOpMod Str TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore ListLoad Str AugAssignAdd NameStore Call NameLoad Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr AugAssignAdd NameStore Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr AugAssignAdd NameStore ListComp SubscriptLoad NameLoad Index Num comprehension NameStore Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr Return Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore BinOpAdd AttributeLoad NameLoad attr TupleLoad NameLoad If CompareNotIn NameLoad AttributeLoad NameLoad attr body Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad If CompareIs NameLoad NameLoad body Raise Call NameLoad BinOpMod Str TupleLoad NameLoad NameLoad If SubscriptLoad NameLoad Index Str body If CompareNotIn NameLoad AttributeLoad NameLoad attr body Assign SubscriptStore AttributeLoad NameLoad attr Index NameLoad Call NameLoad AttributeLoad NameLoad attr NameLoad Return SubscriptLoad AttributeLoad NameLoad attr Index NameLoad orelse If SubscriptLoad NameLoad Index Str body If CompareNotIn NameLoad AttributeLoad NameLoad attr body Assign SubscriptStore AttributeLoad NameLoad attr Index NameLoad Call NameLoad AttributeLoad NameLoad attr NameLoad Return SubscriptLoad AttributeLoad NameLoad attr Index NameLoad orelse Assign NameStore Dict Str Str Str NameLoad Return Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str If BoolOpOr CompareEq NameLoad Str Call AttributeLoad NameLoad attr Str body Return Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad NameLoad Assign NameStore BinOpAdd AttributeLoad NameLoad attr TupleLoad NameLoad Assign NameStore Dict Str Str Str Str NameLoad NameLoad Return Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam defaults body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults vararg kwarg body Assign NameStore Dict Str Str Str Str Str AttributeLoad NameLoad attr NameLoad NameLoad Return Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad keyword NameLoad decorator_list decorator_list
N/A N/A collections N/A sys pykka.exceptions ActorDeadError N/A __all__ N/A ActorProxy ActorProxy N/A object N/A N/A 
    An :class:`ActorProxy` wraps an :class:`ActorRef <pykka.ActorRef>`
    instance. The proxy allows the referenced actor to be used through regular
    method calls and field access.

    You can create an :class:`ActorProxy` from any :class:`ActorRef
    <pykka.ActorRef>`::

        actor_ref = MyActor.start()
        actor_proxy = ActorProxy(actor_ref)

    You can also get an :class:`ActorProxy` by using :meth:`proxy()
    <pykka.ActorRef.proxy>`::

        actor_proxy = MyActor.start().proxy()

    When reading an attribute or getting a return value from a method, you get
    a :class:`Future <pykka.Future>` object back. To get the enclosed value
    from the future, you must call :meth:`get() <pykka.Future.get>` on the
    returned future::

        print actor_proxy.string_attribute.get()
        print actor_proxy.count().get() + 1

    If you call a method just for it's side effects and do not care about the
    return value, you do not need to accept the returned future or call
    :meth:`get() <pykka.Future.get>` on the future. Simply call the method, and
    it will be executed concurrently with your own code::

        actor_proxy.method_with_side_effect()

    If you want to block your own code from continuing while the other method
    is processing, you can use :meth:`get() <pykka.Future.get>` to block until
    it completes::

        actor_proxy.method_with_side_effect().get()

    An actor can use a proxy to itself to schedule work for itself. The
    scheduled work will only be done after the current message and all messages
    already in the inbox are processed.

    For example, if an actor can split a time consuming task into multiple
    parts, and after completing each part can ask itself to start on the next
    part using proxied calls or messages to itself, it can react faster to
    other incoming messages as they will be interleaved with the parts of the
    time consuming task. This is especially useful for being able to stop the
    actor in the middle of a time consuming task.

    To create a proxy to yourself, use the actor's :attr:`actor_ref
    <pykka.Actor.actor_ref>` attribute::

        proxy_to_myself_in_the_future = self.actor_ref.proxy()

    If you create a proxy in your actor's constructor or :meth:`on_start
    <pykka.Actor.on_start>` method, you can create a nice API for deferring
    work to yourself in the future::

        def __init__(self):
            ...
            self.in_future = self.actor_ref.proxy()
            ...

        def do_work(self):
            ...
            self.in_future.do_more_work()
            ...

        def do_more_work(self):
            ...

    An example of :class:`ActorProxy` usage:

    .. literalinclude:: ../examples/counter.py

    :param actor_ref: reference to the actor to proxy
    :type actor_ref: :class:`pykka.ActorRef`

    :raise: :exc:`pykka.ActorDeadError` if actor is not available
     N/A actor_ref None __init__ N/A N/A self actor_ref attr_path N/A None N/A N/A N/A N/A N/A actor_ref is_alive N/A N/A N/A ActorDeadError N/A %s not found actor_ref N/A N/A self actor_ref actor_ref N/A N/A self _actor N/A actor_ref _actor N/A N/A self _attr_path N/A attr_path N/A tuple N/A N/A self _known_attrs N/A N/A self _get_attributes N/A N/A self _actor_proxies N/A N/A N/A self _callable_proxies N/A N/A _get_attributes N/A N/A self N/A N/A N/A Gathers actor attributes needed to proxy the actor N/A result N/A N/A attr_paths_to_visit N/A N/A attr_name N/A attr_name N/A dir N/A self _actor N/A attr_paths_to_visit N/A N/A attr_path N/A N/A attr_paths_to_visit pop 0 N/A N/A N/A self _is_exposable_attribute N/A attr_path N/A -1 N/A N/A attr N/A N/A N/A self _actor _get_attribute_from_path attr_path N/A N/A result N/A N/A tuple attr_path N/A callable traversable N/A N/A self _is_callable_attribute attr N/A N/A self _is_traversable_attribute attr N/A N/A N/A self _is_traversable_attribute attr N/A N/A attr_name N/A dir attr N/A N/A N/A N/A attr_paths_to_visit append N/A attr_path N/A attr_name N/A result N/A _is_exposable_attribute N/A N/A self attr_name N/A N/A N/A 
        Returns true for any attribute name that may be exposed through
        :class:`ActorProxy`.
         N/A N/A N/A N/A attr_name startswith _ N/A _is_callable_attribute N/A N/A self attr N/A N/A N/A Returns true for any attribute that is callable. N/A N/A N/A sys version_info N/A 3 N/A N/A N/A callable attr N/A N/A N/A isinstance attr N/A collections Callable N/A _is_traversable_attribute N/A N/A self attr N/A N/A N/A 
        Returns true for any attribute that may be traversed from another
        actor through a proxy.
         N/A N/A hasattr attr pykka_traversable N/A __repr__ N/A N/A self N/A N/A N/A N/A <ActorProxy for %s, attr_path=%s> N/A N/A self actor_ref N/A self _attr_path N/A __dir__ N/A N/A self N/A N/A N/A result N/A __class__ N/A result N/A list N/A N/A N/A N/A self __class__ __dict__ keys N/A result N/A list N/A N/A N/A self __dict__ keys N/A result N/A N/A attr_path N/A 0 N/A attr_path N/A list N/A N/A N/A self _known_attrs keys N/A N/A sorted result N/A __getattr__ N/A N/A self name N/A N/A N/A Get a field or callable from the actor. N/A attr_path N/A N/A self _attr_path N/A name N/A N/A attr_path N/A self _known_attrs N/A N/A N/A self _known_attrs N/A N/A self _get_attributes N/A attr_info N/A N/A N/A self _known_attrs get attr_path N/A N/A attr_info None N/A N/A N/A AttributeError N/A %s has no attribute "%s" N/A self name N/A N/A attr_info N/A callable N/A N/A N/A attr_path N/A self _callable_proxies N/A N/A N/A N/A self _callable_proxies N/A attr_path N/A _CallableProxy N/A self actor_ref attr_path N/A N/A N/A self _callable_proxies N/A attr_path N/A N/A N/A attr_info N/A traversable N/A N/A N/A attr_path N/A self _actor_proxies N/A N/A N/A N/A self _actor_proxies N/A attr_path N/A ActorProxy N/A self actor_ref attr_path N/A N/A N/A self _actor_proxies N/A attr_path N/A N/A message N/A command attr_path pykka_getattr attr_path N/A N/A N/A N/A self actor_ref ask message block False N/A __setattr__ N/A N/A self name value N/A N/A N/A 
        Set a field on the actor.

        Blocks until the field is set to check if any exceptions was raised.
         N/A N/A N/A name actor_ref N/A N/A name startswith _ N/A N/A N/A N/A N/A super ActorProxy self __setattr__ name value N/A attr_path N/A N/A self _attr_path N/A name N/A message N/A command attr_path value pykka_setattr attr_path value N/A N/A N/A N/A self actor_ref ask message N/A N/A _CallableProxy N/A object N/A N/A Internal helper class for proxying callables. __init__ N/A N/A self ref attr_path N/A N/A N/A N/A self actor_ref ref N/A N/A self _attr_path attr_path N/A __call__ N/A N/A self N/A args kwargs N/A N/A message N/A command attr_path args kwargs pykka_call N/A self _attr_path args kwargs N/A N/A N/A N/A self actor_ref ask message block False N/A N/A