Twisted Network Programming Essentials

Twisted Network Programming Essentials

4.11 - 1251 ratings - Source

Get started with Twisted, the event-driven networking framework written in Python. With this introductory guide, youa€™ll learn the key concepts and design patterns to build event-driven client and server applications for many popular networking protocols. Youa€™ll also learn the tools to build new protocols using Twisteda€™s primitives. Start by building basic TCP clients and servers, and then focus on deploying production-grade applications with the Twisted Application infrastructure. Along the way, you can play with and extend examples of common tasks youa€™ll face when building network applications. If youa€™re familiar with Python, youa€™re ready for Twisted. Learn the core components of Twisted servers and clients Write asynchronous code with the Deferred API Construct HTTP servers with Twisteda€™s high-level web APIs Use the Agent API to develop flexible web clients Configure and deploy Twisted services in a robust and standardized fashion Access databases using Twisteda€™s nonblocking interface Add common server components: logging, authentication, threads and processes, and testing Explore ways to build clients and servers for IRC, popular mail protocols, and SSHAs an example, what if we wanted a logger that logged to stdout and colored error messages red? ... Example 7-4. import sys from twisted. python.log import FileLogObserver class ColorizedLogObserver( FileLogObserver): def emit(self, eventDict): # Reset text color. self.write(aquot;\033[0maquot; ) if eventDict[aquot;isErroraquot;]: # ANSI escape sequence to color text red. from twisted. internet import reactoranbsp;...

Title:Twisted Network Programming Essentials
Author:Jessica McKellar, Abe Fettig
Publisher:"O'Reilly Media, Inc." - 2013-03-12


You Must CONTINUE and create a free account to access unlimited downloads & streaming