twisted.org - Twisted

Example domain paragraphs

Licensed under the open source MIT License

$ virtualenv try-twisted $ . try-twisted/bin/activate $ pip install twisted[tls] $ twist --help Echo Server Web Server Publish/Subscribe Mail Client SSH Client Twisted makes it easy to implement custom network applications. Here's a TCP server that echoes back everything that's written to it:

from twisted.internet import protocol, reactor, endpoints class Echo(protocol.Protocol): def dataReceived(self, data): self.transport.write(data) class EchoFactory(protocol.Factory): def buildProtocol(self, addr): return Echo() endpoints.serverFromString(reactor, "tcp:1234").listen(EchoFactory()) reactor.run() Learn more about writing servers , writing clients and the core networking libraries , including support for SSL, UDP, scheduled events, unit testing infrastructure, and much more.

Links to twisted.org (9)