Twisted Network Programming Essentials

Event-Driven Network Programming with Python

Abe Fettig

Publisher: O'Reilly, 2006, 213 pages

ISBN: 0-596-10032-9

Keywords: Python, Networks

Last modified: Nov. 9, 2008, 11:36 a.m.

Twisted is an open source network-application framework written in the Python programming language. As elegant as Python, Twisted brings power and flexibility to Python programmers. Because Twisted is asynchronous, your programs won't lock up while waiting for a response from the network. It's also event-driven - just write code for the network events you want to handle and let Twisted do the rest. A dedicated corps of developers work hard to keep Twisted extremely stable and secure.

In Twisted Network Programming Essentials, author and experienced Twisted developer Abe Fettig starts you on a journey to Twisted programming mastery. Begin by downloading and installing the Twisted framework. Next, progress to sending TCP/IP messages between simple clients and servers. And then the fun really begins! Twisted can do far more than send and receive messages using low-level protocols such as TCP/IP. The Twisted networking framework makes working with higher level protocols a breeze.

  1. Getting Started
    • Installing Twisted
    • Installing from Source Files
    • Adding Twisted Utilities to Your Path
    • Using the Twisted Documentation
    • Finding Answers to Your Questions
  2. Building Simple Clients and Servers
    • Starting the Twisted Event Loop
    • Working with Asynchronous Results
    • Sending and Receiving Data
    • Accepting Connections from Clients
  3. Web Clients
    • Downloading a Web Page
    • Accessing a Password-Protected Page
    • Uploading a File
    • Checking Whether a Page Has Changed
    • Monitoring Download Progress
  4. Web Servers
    • Responding to HTTP Requests
    • Parsing HTTP Requests
    • Working with POST Data from HTML Forms
    • Managing a Hierarchy of Resources
    • Storing Web Data in an SQL Database
    • Running an HTTP Proxy Server
  5. Web Services and RPC
    • Using the REST Architecture for Web Services
    • Using a Web Client to Update Resources Through REST
    • Enabling Web Services Using XML-RPC
    • Calling XML-RPC Functions
    • Installing SOAP Libraries
    • Sharing Web Services with SOAP
    • Calling SOAP Web Services
    • Sharing Python Objects with Perspective Broker
  6. Authentication
    • Using Authentication in a Twisted Server
    • Authenticating Against a Database Table
    • Representing Users with Different Capabilities
    • Using Authentication with Perspective Broker
  7. Mail Clients
    • Downloading Mail from a POP3 Server
    • Sending Mail Using SMTP
    • Looking Up the SMTP Server for a Domain
    • Listing Mailboxes on an IMAP Server
    • Downloading Messages from an IMAP Mailbox
  8. Mail Servers
    • Accepting Mail with SMTP
    • Using SMTP as a User Interface
    • Providing POP3 Access to Mailboxes
    • Providing IMAP Access to Mailboxes
  9. NNTP Clients and Servers
    • Listing the Newsgroups on a Server
    • Downloading Usenet Articles
    • Posting a Message to an NNTP Server
    • Running a Basic NNTP Server
    • Using NNTP as a User Interface
  10. SSH
    • Setting Up a Custom SSH Server
    • Using Public Keys for Authentication
    • Providing an Administrative Python Shell
    • Running Commands on a Remote Server
  11. Services, Processes, and Logging
    • Running a Twisted Application as a Daemon
    • Setting Limits on an Application's Permissions
    • Managing Multiple Services
    • Logging Events and Errors

Reviews

Twisted Network Programming Essentials

Reviewed by Roland Buresund

Disappointing *** (3 out of 10)

Last modified: June 10, 2008, 7:09 p.m.

Well, it is the ONLY book on Twisted, which I love (as I like Event-driven programming), but it still fails to be more than a cursory overview of Twisted, and it even partly fails at that, as every chapter seems to be independent and just describe the protocol at hand, instead of the framework as a whole.

To its defense, it is written in an easy going style. To read it, you need to understand both TCP/IP (and its applications) as well as Python, or you will be totally lost.

Comments

There are currently no comments

New Comment

required

required (not published)

optional

required