Documentation for pulsar 0.9.2. For development docs, go here.
Pulsar concurrent framework and applications can be used with twisted, an
event driven network engine for python. Twisted has implementation
for several protocols which can be used in pulsar by importing the
pulsar.apps.tx
module.
Warning
This is an experimental implementation, by any means complete. Use at your own risk.
The implementation replaces the twisted reactor with a proxy for
an asyncio event loop.
Twisted Deferred and Failures are made compatible with pulsar
by decorating a callable with the tx()
decorator.
Threads, signal handling, scheduling and so forth is handled by pulsar itself, twisted implementation is switched off.
The code for this example is located in the examples.webmail.manage
module.
The example is a WSGI application with a websocket middleware which connects to an IMAP4 server to retrieve and send emails.
The connection with the IMAP4 server is obtained using the IMAP4 API in twisted 12.3 or later. The example uses pulsar-twisted integration module.
To run the server you need to create a config.py
file in the
the examples.webmail
directory containing:
# the adress of your mail server
mail_incoming ='ssl:host=imap.gmail.com:port=993'
# mail_username & mail_password
mail_username=
mail_password=
And type:
python manage.py
Open a web browser at http://localhost:8060 and you should see the web app.
For information on twisted IMAP4 client library check this example:
http://twistedmatrix.com/documents/current/mail/examples/imap4client.py
Other python examples of webmail: