Foundations of Python Network Programming and over one million other books are available for Amazon Kindle. Learn more



or
Sign in to turn on 1-Click ordering
Sell Us Your Item
For a $16.63 Gift Card
Trade in
More Buying Choices
Have one to sell? Sell yours here
Start reading Foundations of Python Network Programming on your Kindle in under a minute.

Don't have a Kindle? Get your Kindle here, or download a FREE Kindle Reading App.
Sorry, this item is not available in
Image not available for
Color:
Image not available

To view this video download Flash Player

 

Foundations of Python Network Programming: The comprehensive guide to building network applications with Python (Books for Professionals by Professionals) [Paperback]

John Goerzen , Brandon Rhodes
4.5 out of 5 stars  See all reviews (24 customer reviews)

Buy New
$35.07 & FREE Shipping. Details
Rent
$33.35 & this item ships for FREE with Super Saver Shipping. Details
In Stock.
Ships from and sold by Amazon.com. Gift-wrap available.
In Stock.
Rented by RentU and Fulfilled by Amazon.
Want it Wednesday, May 29? Choose One-Day Shipping at checkout. Details
Free Two-Day Shipping for College Students with Amazon Student

Formats

Amazon Price New from Used from
Kindle Edition $19.79  
Paperback $30.41  
Paperback, December 21, 2010 $35.07  
Amazon.com Textbooks Store
Shop the Amazon.com Textbooks Store and save up to 70% on textbook rentals, 90% on used textbooks and 60% on eTextbooks.

Book Description

December 21, 2010 1430230037 978-1430230038 2

This second edition of Foundations of Python Network Programming targets Python 2.5 through Python 2.7, the most popular production versions of the language. Python has made great strides since Apress released the first edition of this book back in the days of Python 2.3. The advances required new chapters to be written from the ground up, and others to be extensively revised.

You will learn fundamentals like IP, TCP, DNS and SSL by using working Python programs; you will also be able to familiarize yourself with infrastructure components like memcached and message queues. You can also delve into network server designs, and compare threaded approaches with asynchronous event-based solutions.

But the biggest change is this edition's expanded treatment of the web. The HTTP protocol is covered in extensive detail, with each feature accompanied by sample Python code. You can use your HTTP protocol expertise by studying an entire chapter on screen scraping and you can then test lxml and BeautifulSoup against a real-world web site. The chapter on web application programming now covers both the WSGI standard for component interoperability, as well as modern web frameworks like Django.

Finally, all of the old favorites from the first edition are back: E-mail protocols like SMTP, POP, and IMAP get full treatment, as does XML-RPC. You can still learn how to code Python network programs using the Telnet and FTP protocols, but you are likely to appreciate the power of more modern alternatives like the paramiko SSH2 library. If you are a Python programmer who needs to learn the network, this is the book that you want by your side.

What you’ll learn

  • Understand low level networking
  • Handle sending and receiving email including composing and decoding emails, SMTP, POP and IMAP
  • Program the lower levels of web application programming such as FastCGI and WSGI and HTTP itself
  • Learn how to use memcached and message qeues using Python
  • Access web services using Python
  • Master multitasking with threads, forking, and asynchronous communication

Who this book is for

This book will be of interest to python programmers who need to program networked applications using Python. From web application developers, to systems integrators, to system administrators—this book has everything you need to know.

Table of Contents

  1. Introduction to Client/Server Networking
  2. UDP
  3. TCP
  4. Socket Names and DNS
  5. Network Data and Network Errors
  6. TLS and SSL
  7. Server Architecture
  8. Caches, Message Queues, and Map-Reduce
  9. HTTP
  10. Screen Scraping
  11. Web Applications
  12. E-mail Composition and Decoding
  13. SMTP
  14. POP
  15. IMAP
  16. Telnet and SSH
  17. FTP
  18. RPC

Frequently Bought Together

Foundations of Python Network Programming: The comprehensive guide to building network applications with Python (Books for Professionals by Professionals) + Violent Python: A Cookbook for Hackers, Forensic Analysts, Penetration Testers and Security Engineers
Price for both: $67.03

Buy the selected items together


Editorial Reviews

About the Author

John Goerzen is an accomplished author, system administrator, and Python programmer. He has been a Debian developer since 1996 and is currently president of Software in the Public Interest, Inc. His previously published books include the Linux Programming Bible, Debian Unleashed, and Linux Unleashed.

Brandon Craig Rhodes has been an avid Python programmer since the 1990s, and a professional Python developer for a decade. He released his PyEphem astronomy library in the same year that Python 1.5 was released, and has maintained it ever since. As a writer and speaker, Brandon enjoys teaching and touting Python, whether as the volunteer organizer of Python Atlanta or on stage at conferences like PyCon. He was editor of the monthly Python Magazine, was pleased to serve as technical reviewer for the excellent Natural Language Processing with Python, and has helped several open source projects by contributing documentation. Today, Brandon operates the Rhodes Mill Studios consultancy in Atlanta, which provides Python programming expertise and web development services to customers both local and out-of-state. He believes that the future of programming is light, concise, agile, test-driven, and enjoyable, and that Python will be a big part of it.

Product Details

  • Paperback: 368 pages
  • Publisher: Apress; 2 edition (December 21, 2010)
  • Language: English
  • ISBN-10: 1430230037
  • ISBN-13: 978-1430230038
  • Product Dimensions: 7.5 x 0.8 x 9.2 inches
  • Shipping Weight: 1.4 pounds (View shipping rates and policies)
  • Average Customer Review: 4.5 out of 5 stars  See all reviews (24 customer reviews)
  • Amazon Best Sellers Rank: #193,214 in Books (See Top 100 in Books)

More About the Author

Discover books, learn about writers, read author blogs, and more.

Customer Reviews

4.5 out of 5 stars
(24)
4.5 out of 5 stars
Most Helpful Customer Reviews
28 of 28 people found the following review helpful
5.0 out of 5 stars A review by an accidental reader - the lucky one :-) October 20, 2004
Format:Paperback|Amazon Verified Purchase
This title accidentally popped up while I was searching for some book covering web programming in Python; bookmarked the link and went on with my quest. Later on, I found what I was looking for (Python Web programming by New Riders) and decided to go back and glimpsed over the table of contents of the book that I'm reviewing now, "Foundations of Python Network Programming". Wow, what a surprise, I was really impressed by the wide coverage on network programming done by the author (even had some doubts at the beginning that this can't be done in a book with less than five hundred pages). Nevertheless, ordered the book and now I'm half way through it (the other book mentioned will have to wait :-). I can hardly think of a major topic about network programming, that is not covered in it, at least in some amount. Considering, otherwise vast area and complexity of network programming, this certainly is a great achievement by the author and a true testimonial on efficiency of Python language.

Author has chosen a tutorial approach; quick introduction, example, commentary of the code, some more examples and comments, conclusion. No fluff and bluff. On top of that technical reviewer has done a superb job, so far I didn't find any typos or non working code samples. Rare for a technical book nowadays but great for a change.

I'm more or less python newbie with little or no background on programming with TCP/IP socket interface, so the first few chapters that are dealing with client/server sockets are more or less new to me (at least I know where to look up first if the need to program on this level arise), chapters covering programming different net clients are more familiar to me, and of the most interest, since this kind of stuff is more likely to cross my path. I think that intermediate level pythonists with some background on network programming and good skills to search the web for more in depth articles/documentation will benefit reading this book the most. Not to say that your Python library should be without this title if you're newbie like me, on contrary, you'll be glad to have this kind of a book at hand when you'll need it - and believe me you'll, sooner or later - just don't expect from a single source of information to become instant network hacker.

Highly recommended!
Comment | 
Was this review helpful to you?
21 of 21 people found the following review helpful
5.0 out of 5 stars Client and server on a range of protocols October 12, 2004
Format:Paperback
The great thing about this book is that it shows both the client and server, in a high-level language (Python), of a variety of different protocols. In this way you learn about the architecture of the protocols, as well as how to use Python to implement them. The book covers XML-RPC, IMAP, HTTP, FTP, among others. It also includes information on high performance web server python through mod_python.

The book is very focused on the code. There are no illustrations. And the text is mainly just a binder to walk you around through the code.

This book makes an excellent addition to your Python bookshelf. Additionally you may want to have a look at this book if you are interested in the protocols even if the implementation isn't in Python, since Python is very clear and easily translatable into other languages.
Comment | 
Was this review helpful to you?
26 of 28 people found the following review helpful
5.0 out of 5 stars This is an Essential Python Book October 19, 2004
Format:Paperback
For the time-crunched, in-need-of-a-quick-fix reader: This is an excellent, much-needed book. If you want to do network programming with Python or, for that matter, any scripting language (as many of the concepts here are basic, essential, and adaptable) buy this book and be happy. With clear code examples, concise text, and insightful attention to the needs of the target audience -- practical programmers in need of a quick intro -- John Goerzen dispenses with the dross and gives the reader a head-first survey of network programming.

The book's title hits the target audience but doesn't, however, precisely characterize the thrust of the text. "Foundations" implies a broad structure on which to build and this book certainly addresses network programming in a broad sweep. Yet the book had a feel more accurately described as "learning by example" than a "foundations" approach might traditionally imply. Basic concepts are given a cursory overview, but if you wish to get to the nitty gritty details of sockets, protocols or network services then look for that sort of foundation elsewhere. Here you will, instead, get a few terms covered in just a few pages and then you're presented with working examples of Python code.

By no means should this be construed as an overall weakness. This observation is only made in order to clarify Foundation's approach: quick and cut-to-the-chase. Chapters are short, averaging a little over 19 pages, and the overall feel is that of a "cookbook" with an emphasis on gentle explanation. If what you want is to get up and running, leaving small details for later if necessary, then you've come to the right place. But perhaps "Python Network Programming by Example", or "The Joy of Python Network Programming", would be more fitting.

The author, who has been a member of the Debian GNU/Linux development team since 1996 (the Unix/Linux bias shows slightly here, with some space devoted to to inetd and forking), does the learn-by-doing reader a great favor by providing copious working examples of readily grasped code which cover straightforward solutions to typical problems or situations with an emphasis -- a very nice emphasis -- on error-checking and recovery from the various hiccups of network programming. Nothing teaches like good code with astute attention paid to explaining key concepts and usual corner cases, and this is the case here.

The writing style is a little dry. That said, the prose is both clear and concise and does a good job of speedily presenting new, potentially tricky concepts, another notable strength. Chapters five, "Advanced Network Operations", and seven, "XML and XML-RPC", are both good examples.

The first five chapters, which form the first section, "Low-Level Networking", get the reader started with sockets, servers, and DNS. These are probably the only essential chapters of the book, especially if the reader is new to these topics, in that they reveal Python's general approach to networking within the standard library. After that the reader would do well to, more or less, hop around among the remaining chapters as needed. Part Two covers Web services, with some nice coverage of XHTML and XML parsing. Part Three addresses E-mail services: MIME, SMTP, POP, and IMAP. Part Four takes a general shot at FTP, database clients, and (a very brief) chapter on SSL. Part Five is on server-side frameworks, covering a three items, SocketServer, SimpleXMLRPCServer, and CGI, all which come as standard modules, along with an introduction to mod_python, which does not. Part Six is on multitasking, lending an overview of threading and forking, and asynchronous communication.

That's a lot. Some subjects, like SSL and async, can't be covered in a great deal of detail given the space provided, and if this is your first exposure to these topics, you'll be left wanting. But you will be effectively introduced.

The Twisted Framework (http://www.twistedmatrix.com) is discussed in Chapter 12, IMAP, which is nice, and is touched on again in the final chapter on async. It would have been nicer to see some more Twisted coverage, since Twisted is one of the most elegant and distinctly Pythonic approaches to networking, but there's material available on the Web and, again, this gets you pointed in the right direction.

The only final criticism that might be leveled about the book is that, at times, some of the approaches don't seem particularly "Pythonic". The database client chapter, for example, doesn't cover the common Python approach of operater overloading, such as overloading __getitem__ in order to wrap a SQL SELECT statement. In this and certain other parts of the book, if you are not new to some only moderately advanced concepts in Python, then the reader will be able to see where certain choices were made between the notions of "Foundations" (and how foundational to be) and "Python" (and just how pythonic to get).

Criticisms aside, this is a fine book, and a fine complement to Apress's rather excellent "Diving Into Python" by Mark Pilgrim. "Foundations" fills a fundamental need for this information to be aggregated into a cohesive resource, and the book's no-nonsense, effective approach should win over both new Python converts looking to implement their first network client or Web site, or experienced Pythonistas who desire quick information at their fingertips. I thoroughly enjoyed this book and I heartily recommend it.
Comment | 
Was this review helpful to you?
Most Recent Customer Reviews
5.0 out of 5 stars Foundations of Python Network Programming
The book fulfilled exactly the need I had. I needed information on how to secure information over a network, and it described what I needed perfectly. Read more
Published 7 months ago by PatM
5.0 out of 5 stars A must have for Python professionals
The book contains a complete reference for Python networking, covering basic and advanced topics. When i started reading, i didn't know anything about networking, but the book... Read more
Published 11 months ago by elfotografo007
5.0 out of 5 stars Really Great Book!!
before buying this book, I was a bit concerned about the python version on which it is written because I am not interested in the past Python versions including 2.7. Read more
Published 21 months ago by Chang Min
5.0 out of 5 stars Good depth and breadth of topics
Why I picked it up: I know Brandon through PyATL and was confident that his years of experience would ensure that he put out a high quality book. Read more
Published on February 27, 2011 by Doug Hellmann
4.0 out of 5 stars A great way to get up to speed with network programming using Python
The book is written in an engaging, conversational style and is filled with useful nuggets of information about a wide variety of network protocols and the Python modules that... Read more
Published on February 9, 2011 by MENNO J SMITS
5.0 out of 5 stars Exhaustive and Authoritative
I wish I'd had this book years ago. It's a very solid introduction to both network protocols and to using Python to work with them. Read more
Published on January 31, 2011 by Stephen McMahon
5.0 out of 5 stars These guys know what they are talking about..
As I am relatively new to Python I originally felt that such advanced programming subjects were way above my head, not just due to my overal knowledge on Python itself, but mostly... Read more
Published on January 17, 2011 by Eelco
1.0 out of 5 stars Not Python 3
As someone who ordered it before release (being told by Amazon it dealt with python 3), I'm VERY disappointed it still deals with python 2. 'Will ask for a refund.
Published on January 2, 2011 by Eduardo M.
1.0 out of 5 stars This book has nothing to do with Python "3"
The book is announced with the following title and description as you know:

"Foundations of Python 3 Network Programming, Second Edition"

"This book gives you... Read more
Published on December 24, 2010 by Ersin Er
5.0 out of 5 stars Excellent Book, Highly Recommended For Any Python Programming
This is definitely a must have for anyone doing Python (Network) programming.

The 175 included working applications make it so easy to implement and actually use the... Read more
Published on April 20, 2009 by Chris M
Search Customer Reviews
Only search this product's reviews

What Other Items Do Customers Buy After Viewing This Item?


Forums

Have something you'd like to share about this product?
Start a new discussion
Topic:
First post:
Prompts for sign-in
 


Search Customer Discussions
Search all Amazon discussions


So You'd Like to...


Create a guide


Look for Similar Items by Category