Here's what you need to get up and running with diesel in a flash.
diesel uses setuptools which makes basic installation simple.
easy_install -UZ diesel
Here is the "Hello, world" of event-driven network applications: the echo server!
#!/usr/bin/env python2.6
from diesel import Application, Service, until_eol
def hi_server(addr):
while 1:
inp = (yield until_eol())
if inp.strip() == "quit":
break
yield "you said %s" % inp
app = Application()
app.add_service(Service(hi_server, 8013))
app.run()
Try it out by running the code above in one terminal and telnet localhost 8013 in another. Anything you type into the telnet session will be echoed back to you. If you type "quit" you will be disconnected.
Read the complete documentation for the full story on creating high-performance network applications with diesel.