[Twisted-Python] where to begin

Christopher Armstrong radix at twistedmatrix.com
Tue Feb 11 07:02:39 EST 2003

On Tue, Feb 11, 2003 at 04:35:38PM +1100, Andrew Bennetts wrote:
> On Tue, Feb 11, 2003 at 04:59:49PM +1300, Rob Brown-Bayliss wrote:
> > Every thing seems to link on to something else, deffereds, it's own web
> > servewr etc, it seems like it's a joke, or if not then certianly
> > overkill for sending data over sockets.
> That's a natural by-product of Twisted being a framework, unfortunately;
> it's hard to take-or-leave each individual piece, you basically have to take
> the whole framework or none of it.

I really don't like how this was answered :) You _don't_ need to take
the entire framework; e.g., you don't need to import the web server,
mail server, etc, unless you want to use them. Deferreds are an
important fundamental thing in Twisted, however; they're one of the
basic abstractions that we use a *lot* in asynchronous
programming. Also, there's nothing stopping someone from tearing apart
Twisted and distributing only the parts they need with their
applications, web server be damned. ;-)

Also, I should note the package layout: twisted.internet is the very
basic stuff that your Twisted app will never be
without. twisted.python has a lot of utilities that twisted.internet
and other packages use. twisted.protocols gives you all the basic
protocol support. These three packages are the most fundamental to
Twisted. The rest are mainly application-level packages.

In addition to these, though, it sounds like Rob will also want to use
twisted.spread (and twisted.cred) for his application. Most of the
rest is unneeded.

 Twisted | Christopher Armstrong: International Man of Twistery
  Radix  |          Release Manager,  Twisted Project
---------+     http://twistedmatrix.com/users/radix.twistd/

More information about the Twisted-Python mailing list