Twisted includes an event-driven web server. Here's a sample web application; notice how the resource object persists in memory, rather than being recreated on each request:
Welcome to the Twisted documentation! Installing Twisted Hard dependencies Optional Dependencies Twisted Core Developer Guides Examples Specifications Twisted Conch (SSH and Telnet) Developer Guides Examples Twisted Mail (SMTP, POP, and IMAP) Examples Developer Guides Twisted Mail Tutorial: Building an SMTP Client from Scratch Twisted Names ...
Using the Twisted Web Client Overview This document describes how to use the HTTP client included in Twisted Web. After reading it, you should be able to make HTTP and HTTPS requests using Twisted Web. You will be able to specify the request method, headers, and body and you will be able to retrieve the response code, headers, and body. A number of higher-level features are also explained ...
WebSockets Twisted Web provides support for the WebSocket protocol for clients (such as web browsers) to connect to resources and receive bi-directional communication with the server. For the purposes of our example here, you will need to have some familiarity with the concepts covered in serving static content and rpy scripts, because we will be using those to construct our resource hierarchy.
Writing Servers Overview This document explains how you can use Twisted to implement network protocol parsing and handling for TCP servers (the same code can be reused for SSL and Unix socket servers). There is a separate document covering UDP. Your protocol handling class will usually subclass twisted.internet.protocol.Protocol. Most protocol handlers inherit either from this class or from ...
Twisted Web Developer guides: documentation on using Twisted Web to develop your own applications Examples: short code examples using Twisted Web
The major tool that manages Twisted applications is a command-line utility called twistd. twistd is cross platform, and is the recommended tool for running Twisted applications. The core component of the Twisted Application infrastructure is the twisted.application.service.Application object – an object which represents your application.
Using the Twisted Application Framework Introduction Audience The target audience of this document is a Twisted user who wants to deploy a significant amount of Twisted code in a re-usable, standard and easily configurable fashion. A Twisted user who wishes to use the Application framework needs to be familiar with developing Twisted servers and/or clients. Goals To introduce the Twisted ...