Fetching contributors…
Cannot retrieve contributors at this time
107 lines (68 sloc) 2.22 KB

Pykka API

.. module:: pykka

.. attribute:: __version__

   Pykka's :pep:`386` and :pep:`396` compatible version number


.. autoexception:: pykka.ActorDeadError

.. autoclass:: pykka.Actor

.. autoclass:: pykka.ThreadingActor

.. autoclass:: pykka.ActorRef


.. autoclass:: pykka.ActorProxy


.. autoexception:: pykka.Timeout

.. autoclass:: pykka.Future

.. autoclass:: pykka.ThreadingFuture

.. autofunction:: pykka.get_all


.. autoclass:: pykka.ActorRegistry

Gevent support

.. automodule:: pykka.gevent

Eventlet support

.. automodule:: pykka.eventlet


Pykka uses Python's standard :mod:`logging` module for logging debug statements and any unhandled exceptions in the actors. All log records emitted by Pykka are issued to the logger named "pykka", or a sublogger of it.

Out of the box, Pykka is set up with :class:`logging.NullHandler` as the only log record handler. This is the recommended approach for logging in libraries, so that the application developer using the library will have full control over how the log records from the library will be exposed to the application's users. In other words, if you want to see the log records from Pykka anywhere, you need to add a useful handler to the root logger or the logger named "pykka" to get any log output from Pykka. The defaults provided by :meth:`logging.basicConfig` is enough to get debug log statements out of Pykka:

import logging

If your application is already using :mod:`logging`, and you want debug log output from your own application, but not from Pykka, you can ignore debug log messages from Pykka by increasing the threshold on the Pykka logger to "info" level or higher:

import logging

For more details on how to use :mod:`logging`, please refer to the Python standard library documentation.

Debug helpers

.. automodule:: pykka.debug