Introduction
Connecting your software - and having fun too!
Getting Started
Basic network servers with Twisted.
And basic clients.
Test-driven development with Twisted
Code without tests is broken by definition; Twisted makes it easy to test your network code.
Tutorial: Twisted From Scratch
The Evolution of Finger: adding features to the finger service
The Evolution of Finger: moving to a component based architecture
The Evolution of Finger: Twisted client support using Perspective Broker
The Evolution of Finger: using a single factory for multiple protocols
The Evolution of Finger: configuration and packaging of the finger service
Networking and Other Event Sources
A brief overview of the twisted.internet
package.
The event loop at the core of your program.
Add some security to your network transport.
UDP Networking How to use Twisted’s UDP implementation, including multicast and broadcast functionality.
Launching sub-processes, the correct way.
Like callback functions, only a lot better.
In-depth information on Deferreds.
More about Deferreds.
Timeouts, repeated events, and more: when you want things to happen later.
Running code in threads, and interacting with Twisted in a thread-safe manner.
Producers and Consumers: Efficient High-Volume Streaming
How to pause when buffers fill up.
Choosing a reactor and GUI toolkit integration
GTK+, Windows, epoll() and more: use your GUI of choice, or a faster event loop.
High-Level Infrastructure
Getting Connected with Endpoints
Create configurable applications that support multiple transports (e.g. TCP and SSL).
Interfaces and Adapters (Component Architecture)
When inheritance isn’t enough.
Cred: Pluggable Authentication Implementing authentication and authorization that is configurable, pluggable and re-usable.
A generic plugin system for extendable programs.
Deploying Twisted Applications
Helper programs and scripts (twistd, ..)
twistd
lets you daemonize and run your
application.
Using the Twisted Application Framework
Writing code that twistd
can run.
Writing Twisted Application Plugins for twistd
More powerful twistd
deployment method.
Deploying Twisted with systemd
Use systemd
to launch and
monitor Twisted applications
Utilities
Keep a record of what your application is up to.
enum-like constants.
Twisted RDBMS support with adbapi
Using SQL with your relational database via DB-API adapters.
Parsing command-line arguments
The command-line argument parsing used by twistd
.
Using Dirdbm: Directory-based Storage
A simplistic way to store data on your filesystem.
Tips for writing tests for Twisted code using Trial
More information on writing tests.
Extremely Low-Level Socket Operations
Using wrappers for sendmsg(2) and recvmsg(2).
Asynchronous Messaging Protocol (AMP)
Asynchronous Messaging Protocol Overview
A two-way asynchronous message passing protocol, for when HTTP isn’t good enough.
Perspective Broker
A remote method invocation (RMI) protocol: call methods on remote objects.
Positioning
Appendix