E-Book Overview
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
E-Book Content
BOOKS FOR PROFESSIONALS BY PROFESSIONALS ®
Brandon Rhodes
John Goerzen
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.
THE APRESS ROADMAP Companion eBook
www.apress.com Shelve in: Python User level: Intermediate–Advanced
Pro Python
Beginning Python Dive into Python 3
Foundations of Python Network Foundations of Agile Programming Python Development
Pro Python Python Algorithms
Dive into Python 3
Foundations of Agile Python Development
Python Algorithms
Foundations of
SECOND EDITION
Rhodes Goerzen
SOURCE CODE ONLINE
Foundations of Python Network Programming
Beginning PythonROADMAP THE APRESS
Companion eBook Available
Python Network Programming
Foundations of Python Network Programming
THE EXPERT’S VOICE ® IN OPEN SOURCE
Foundations of
Python Network Programming The comprehensive guide to building network applications with Python
SECOND EDITION
Brandon Rhodes and John Goerzen
Foundations of Python Network Programming The comprehensive guide to building network applications with Python
Second Edition
■■■ Brandon Rhodes John Goerzen
i
Foundations of Python Network Programming: The comprehensive guide to building network applications with Python Copyright © 2010 by Brandon Rhodes and John Goerzen All rights reserved. No part of this work may be reproduced or transmitted in any form or by any means, electronic or mechanical, including photocopying, recording, or by any information storage or retrieval system, without the prior written permission of the copyright owner and the publisher. ISBN-13 (pbk): 978-1-4302-3003-8 ISBN-13 (electronic): 978-1-4302-3004-5 Printed and bound in the United States of America (POD) Trademarked names, logos, and ima