Introduction to Twisted
Presented by Chander Ganesan
Interested in faster networking with Python? Twisted is an event-driven networking engine written in Python that allows developers to quickly and easily develop and deploy network services.
In this tutorial, attendees will learn what twisted is, why to use it, how it works, and how to install, develop, and deploy simple clients and servers using Twisted.
Attendees should bring a laptop if possible, to try out code examples in class.
Intermediate Python Programmers with an understanding of Pythons object oriented syntax (classes, inheritance, etc.)
- Introduction to Twisted (15 min) - Basic Concepts
- Event-Driven model, cooperative multi-tasking
- Installing Twisted & Verifying Installation (10 min)
- Starting the Event loop (10 min)
- Timed Events (10 min)
- Understanding Twisted Factories & their use (15 min)
- Understanding Protocol Objects & their use (15 min)
- Creating a simple Twisted Client (25 min)
- Using twisted.internet.reactor.connectTCP()
- Creating a Client Factory
- Creating a Protocol
- Creating a simple Twisted Server (Server Factory) (25 min)
- Using twisted.internet.reactor.listenTCP()
- Creating a Server Factory
- Using Twisted SMTP to Send Mail (15 min)
- Twisted Web Basics (25 min)
- Introduction to the twist Daemonizer & tac files (15 min)
- An understanding of Object Oriented Python (OOP concepts, inheritance, classes, etc.)
- Attendees wishing to try the examples should have Python 2.4 or newer and Twisted pre-installed.
- Attendees wishing to try the examples should have Python 2.4 or newer and Twisted pre-downloaded (we'll go over installation)
- Twisted may be downloaded at http://www.twistedmatrix.com/
- Windows users will require the Win32 extensions for Python as well http://starship.python.net/crew/mhammond/win32/Downloads.html