Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Arrow up icon
GO TO TOP
Learning Python Networking

You're reading from   Learning Python Networking Utilize Python 3 to get network applications up and running quickly and easily

Arrow left icon
Product type Paperback
Published in Jun 2015
Publisher
ISBN-13 9781784396008
Length 320 pages
Edition 1st Edition
Languages
Concepts
Arrow right icon
Author (1):
Arrow left icon
Sam Washington Sam Washington
Author Profile Icon Sam Washington
Sam Washington
Arrow right icon
View More author details
Toc

Table of Contents (17) Chapters Close

Learning Python Network Programming
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
1. Network Programming and Python FREE CHAPTER 2. HTTP and Working with the Web 3. APIs in Action 4. Engaging with E-mails 5. Interacting with Remote Systems 6. IP and DNS 7. Programming with Sockets 8. Client and Server Applications 9. Applications for the Web Working with Wireshark Index

Index

A

  • absolute URL / Paths and relative URLs
  • access / Alternative oAuth flows
  • Access ID / Setting up an AWS user
  • Access Secret / Setting up an AWS user
  • ACK / TCP
  • ACLs (Access Control Lists) / Retrieving an uploaded file through a web browser
  • Amazon S3 API
    • about / The Amazon S3 API
    • AWS, registering with / Registering with AWS
    • regions / Regions
    • S3 buckets / S3 buckets and objects
    • objects / S3 buckets and objects
    • S3 command line client / An S3 command-line client
    • file, downloading with / Downloading a file with the API
    • XML, parsing / Parsing XML and handling errors
    • error handling / Parsing XML and handling errors, Handling errors
    • elements, searching / Finding elements
    • enhancements / Further enhancements
    • boto package / The Boto package
    • wrapping up / Wrapping up with S3
  • Amazon Web Services (AWS)
    • about / The Amazon S3 API
    • registering with / Registering with AWS
    • URL / Registering with AWS
  • application layer, TCP/IP networks
    • about / Layer 5 – The application layer
  • asyncio based chat server / An asyncio-based chat server
  • asyncio documentation
    • URL / More on frameworks
  • atomic / Queues
  • attribute / Element attributes
  • authentication, Amazon S3 API
    • about / Authentication
    • AWS user, setting up / Setting up an AWS user
  • authentication, for Twitter
    • about / Authentication for Twitter
    • application, registering for Twitter API / Registering your application for the Twitter API
    • requests, authenticating / Authenticating requests
    • Twitter client / A Twitter client
  • AWS console
    • URL / Setting up an AWS user

B

  • Baiduspider
    • URL / Choosing a User Agent
  • base.html file
    • about / Templating
  • boto package
    • about / The Boto package
  • broadcast address
    • about / Routing with IP

C

  • CGI
    • about / CGI
  • chat protocol
    • about / A chat protocol
  • chat server
    • designing / Designing a chat server
  • CherryPy
    • URL / Python and the Web, Web frameworks
  • CIDR notation
    • about / Routing with IP
  • client/server model / Client and server
  • CommunityData() parameter / Fetching Simple Network Management Protocol data
  • concurrent I/O
    • about / Concurrent I/O
  • connection header
    • URL / What's in a web server?
  • consumer / Alternative oAuth flows
  • content negotiation
    • about / Content negotiation
    • content types / Content types
  • content types / Content types
  • cookies
    • about / Cookies, Know your cookies
    • handling / Cookie handling
  • CPython interpreter
    • about / Threading and the GIL
  • Cross-Site Request Forgery (CSRF) / CSRF
    • URL / CSRF
  • custom SSL client/server
    • creating / Creating a custom SSL client/server
    • interaction, inspecting / Inspecting interaction between a custom SSL client/server

D

  • data
    • handling, on persistent connections / Handling data on persistent connections
  • dele() method
    • about / Retrieving e-mails by using POP3 with poplib
  • Django
    • URL / Web frameworks
  • DNS look-up
    • about / DNS look-ups
    • DNS client/server communication, inspecting / Inspecting DNS client/server communication
  • dnspython library
    • URL / DNS look-ups
  • docstring.html file
    • about / Templating
  • Domain Name System (DNS)
    • about / DNS
  • dot-decimal notation / IP addresses
  • Dynamic Host Configuration Protocol (DHCP) / Assigning IP addresses

E

  • e-mail
    • about / E-mail terminologies
    • sending, with SMTP / Sending e-mails with SMTP
    • sending, with TLS / Sending e-mails securely with TLS
    • retrieving, POP3 used with poplib / Retrieving e-mails by using POP3 with poplib
    • retrieving, IMAP used with imaplib / Retrieving e-mails by using IMAP with imaplib
  • e-mail attachments
    • sending / Sending e-mail attachments
  • e-mail message
    • composing / Composing an e-mail message
    • sending / Sending an e-mail message
  • echo protocol
    • about / An echo protocol
    • framing / Framing
  • ElementTree
    • about / The XML APIs
    • basics / The basics of ElementTree
    • child / The basics of ElementTree
    • parent / The basics of ElementTree
    • siblings / The basics of ElementTree
    • output format / Pretty printing
    • element attributes / Element attributes
    • converting, to text / Converting to text
  • email
    • sending, via logging module / Sending e-mails via the logging module
  • event-driven architecture / Concurrent I/O
  • event-driven model / Event-driven servers
  • event-driven servers / Event-driven servers, Event-driven servers
  • eventlet based chat server / An eventlet-based chat server
  • event loop / Event-driven servers
  • Extended SMTP (ESMTP) protocol
    • about / Sending e-mails with SMTP

F

  • files
    • transferring, through SFTP / Transferring files through SFTP
    • transferring, through FTP / Transferring files with FTP
    • sharing, with SAMBA / Sharing files with SAMBA
  • first-in first-out (FIFO) / Queues
  • Flask
    • URL / Web frameworks
    • about / Flask – a microframework
    • templating / Templating
    • templating engines / Other templating engines
    • some style, adding / Adding some style
    • security / A note on security
    • finishing up / Finishing up with frameworks
    • URL, for tutorial / Finishing up with frameworks
  • Flask site
    • URL / CSRF
  • frameworks / Frameworks
  • framing
    • about / Framing
  • FTP
    • files, transferring through / Transferring files with FTP
    • URL / Transferring files with FTP
  • FTP packets
    • inspecting / Inspecting FTP packets

G

  • gateway / Networks
  • GeoIP look-ups
    • about / GeoIP look-ups
  • Global Interpreter Lock (GIL) / Threading and the GIL
    • URL / Threading and the GIL
  • graphical user interface (GUI)
    • about / E-mail terminologies
  • Gunicorn
    • URL / Python and the Web
  • Gunicorn pages
    • URL / Hosting in practice
  • Gunicorn web server / Hosting in practice

H

  • handshake / TCP
  • header / Packets
  • host identifier
    • about / Routing with IP
  • HTTP
    • request / Request and response
    • response / Request and response
    • requests with urllib / Requests with urllib
    • response objects / Response objects
    • status codes / Status codes
    • problems, handling / Handling problems
    • requests, customizing / Customizing requests
    • content negotiation / Content negotiation
    • user agents / User agents
    • cookies / Cookies
    • redirects / Redirects
    • URLs / URLs
    • formal inspection / Formal inspection
  • HTTP headers
    • headers / HTTP headers
    • body / HTTP headers
    • about / HTTP headers
  • HTTP methods
    • about / HTTP methods
    • HEAD method / The HEAD method
    • POST method / The POST method
  • HTTPS
    • about / HTTPS
  • HTTP status code / Looking deeper

I

  • IETF landing page, for RFCs
    • URL / Taking it from the top
  • IMAP
    • about / E-mail terminologies
  • IMAP, with imaplib
    • used, for retrieving e-mail / Retrieving e-mails by using IMAP with imaplib
  • imaplib
    • about / Retrieving e-mails by using IMAP with imaplib
  • index.html file
    • about / Templating
  • inheritance
    • about / Templating
  • installation
    • Wireshark / Installation
  • Internet Assigned Numbers Authority (IANA) / IP addresses on the Internet
  • Internet Engineering Task Force (IETF)
    • about / An introduction to TCP/IP networks
    • URL / An introduction to TCP/IP networks
  • Internet media types / Content types
  • Internet Message Access Protocol (IMAP) / E-mail terminologies
  • Internet Message Format (IMF)
    • about / Sending e-mails with SMTP
  • Internet Protocol version 4 (IPv4) / An introduction to TCP/IP networks
  • Internet Service Provider (ISP)
    • about / Networks
  • in_reply_to_status_id / Sending a reply
  • IP addresses, manipulating
    • about / Manipulating IP addresses
    • IP network objects / IP network objects
    • network interface objects / Network interface objects
    • IP address objects / The IP address objects
    • IP address, planning for local area network / Planning IP addresses for your local area network

J

  • JSON
    • about / JSON
    • encoding / Encoding and decoding
    • decoding / Encoding and decoding
    • dicts, using with / Using dicts with JSON
    • object types / Other object types

L

  • layer 4, TCP/IP networks
    • network ports / Network ports
    • UDP / UDP
    • TCP / TCP
  • LDAP
    • about / Reading Light-weight Directory Access Protocol data
    • data, reading / Reading Light-weight Directory Access Protocol data
    • packets, inspecting / Inspecting LDAP packets
  • Library Reference
    • URL / Taking it from the top
  • list() method
    • about / Retrieving e-mails by using POP3 with poplib
  • localhost / Network interfaces
  • locks / Locks
  • logging module
    • email, sending via / Sending e-mails via the logging module
  • loopback interface / Network interfaces
  • low-level event-driven chat server / A low-level event-driven chat server

M

  • Mail Transfer Agent (MTA)
    • about / E-mail terminologies
  • main thread
    • about / Multithreading and multiprocessing
  • management information base (MIB)
    • about / Fetching Simple Network Management Protocol data
  • man in the middle (MITM) attack / Securing sockets with TLS/SSL
  • MibVariable parameter / Fetching Simple Network Management Protocol data
  • micro frameworks / Web frameworks
  • Microsoft's Internet Information Services (IIS) / Hosting Python web applications
  • MIME types / Content types
  • Mozilla/5.0 compatible; bingbot/2.0
    • URL / Choosing a User Agent
  • Mozilla/5.0 compatible; Googlebot/2.1
    • URL / Choosing a User Agent
  • Multi-purpose Internet Mail Extensions (MIME)
    • about / Composing an e-mail message
  • multiprocessing / Multithreading and multiprocessing
  • multithreaded chat client / A multithreaded chat client
  • multithreaded chat server
    • about / A multithreaded chat server
    • queues / Queues
    • locks / Locks
  • multithreaded echo server
    • about / A multithreaded echo server
  • multithreading / Concurrent I/O, Multithreading and multiprocessing

N

  • name resolution / Filtering
  • netmask
    • about / Routing with IP
  • network address
    • about / Routing with IP
  • Network Address Translation (NAT) / IP addresses on the Internet
  • network configuration, of local machine
    • retrieving / Retrieving the network configuration of a local machine
  • network location / URLs
  • network ports
    • about / Network ports
  • network prefix
    • about / Routing with IP
  • network programming, with Python
    • about / Network programming with Python
  • network stack
    • about / Breaking a few eggs
    • traceback, generating / Breaking a few eggs
    • using / Taking it from the top
    • RFC, downloading / Downloading an RFC
    • program, modifying / Looking deeper
    • TCP/IP networks, programming for / Programming for TCP/IP networks
  • non-blocking socket I/O
    • about / A non-blocking socket I/O
  • non-blocking sockets / Concurrent I/O
  • nslookup tool / DNS
  • NTP client
    • about / NTP clients
    • /server communication, inspecting / Inspecting the NTP client/server communication
  • NTP protocol
    • URL / NTP clients

O

  • oAuth
    • URL / Authenticating requests
  • octets / IP addresses
  • OWASP site
    • URL / CSRF

P

  • packet
    • about / Packets
  • packetization / Packets
  • packet sniffers
    • about / Packet sniffers
  • parameters, Twitter
    • 'count' / Polling for Tweets
    • 'include_entities' / Polling for Tweets
    • 'include_rts' / Polling for Tweets
    • 'since_id' / Polling for Tweets
  • path / URLs
  • payload
    • about / Packets
  • percent encoding / URL encoding
  • persistent connections
    • data, handling on / Handling data on persistent connections
  • POP3
    • about / E-mail terminologies
  • POP3, with poplib
    • used, for retrieving e-mail / Retrieving e-mails by using POP3 with poplib
  • poplib
    • about / Retrieving e-mails by using POP3 with poplib
  • port numbers
    • URL / Network ports
  • ports
    • about / Network ports
  • POST method
    • about / The POST method
  • pre-forking / Recycling for a better world
  • private addresses / IP addresses on the Internet
  • process / Multithreading and multiprocessing
  • programming Q&A page
    • URL / Taking it from the top
  • protocol / Working with TCP sockets
  • protocols, e-mail
    • Simple Mail Transfer Protocol (SMTP) / E-mail terminologies
    • Post Office Protocol 3 (POP3) / E-mail terminologies
    • Internet Message Access Protocol (IMAP) / E-mail terminologies
  • pull option / A chat protocol
  • push option / A chat protocol
  • PyPI
    • URL / Secure shell – access using Python
  • Pyramid
    • URL / Web frameworks
  • Python
    • URL / Threading and the GIL
    • web server / Python and the Web
    • web framework / Web frameworks
  • python-geoip / GeoIP look-ups
  • Python package index
    • URL / Taking it from the top
  • Python Standard library documentation page
    • URL / Retrieving e-mails by using IMAP with imaplib
  • Python templating engines
    • about / Other templating engines
    • URL / Other templating engines
  • Python web applications
    • hosting / Hosting Python web applications
    • CGI / CGI
    • recycling / Recycling for a better world
    • event-driven servers / Event-driven servers
    • WSGI / WSGI
    • hosting, in practice / Hosting in practice
  • Python web frameworks
    • Django / Web frameworks
    • CherryPy / Web frameworks
    • Flask / Web frameworks
    • TurboGears / Web frameworks
    • Pyramid / Web frameworks
    • Tornado / Web frameworks

Q

  • queues / Queues
  • quit() method
    • about / Retrieving e-mails by using POP3 with poplib

R

  • race condition / Queues
  • redirects
    • about / Redirects
  • Regional Internet Registries (RIRs) / IP addresses on the Internet
  • regional routers
    • about / Networks
  • relative URLs / Paths and relative URLs
  • request
    • about / Request and response
  • Request for Comments (RFC) / Taking it from the top
  • request line / HTTP headers
  • request method / HTTP headers
  • requests, customizing
    • about / Customizing requests
    • content compression / Content compression
    • multiple values / Multiple values
  • requests, with urllib
    • about / Requests with urllib
  • requests-oauthlib documentation
    • URL / Alternative oAuth flows
  • Requests for Comment (RFCs) / An introduction to TCP/IP networks
  • Requests library
    • about / The Requests library
    • URL / The Requests library
    • errors handling with / Handling errors with Requests
  • response
    • about / Request and response
  • response objects
    • about / Response objects
  • REST (Representational State Transfer) / The Amazon S3 API
  • REST API / The Amazon S3 API
  • retr() method
    • about / Retrieving e-mails by using POP3 with poplib
  • reverse proxy / Hosting in practice
  • RFC 2822
    • URL / Sending e-mails with SMTP
  • RFC4251
    • URL / Secure shell – access using Python
  • RFC 4291
    • URL / IPv6
  • Robots.txt file
    • URL / The Robots.txt file
    • about / The Robots.txt file
  • root / Paths and relative URLs
  • router
    • about / Networks
  • routing table
    • about / Networks

S

  • S3 buckets
    • about / S3 buckets and objects
  • S3 command line client
    • about / An S3 command-line client
    • bucket, creating with API / Creating a bucket with the API
    • file, uploading / Uploading a file
    • uploaded file, retrieving through web browser / Retrieving an uploaded file through a web browser
    • uploaded file, displaying in web browser / Displaying an uploaded file in a web browser
  • SAMBA
    • files, sharing with / Sharing files with SAMBA
    • packets, inspecting / Inspecting SAMBA packets
  • SAX / The XML APIs
  • scheme / URLs
  • screen scraping, HTML
    • about / HTML and screen scraping
    • HTML parsers / HTML parsers
    • data, displaying / Show me the data
    • HTML, parsing with lxml / Parsing HTML with lxml
    • zeroing in / Zeroing in
    • XPath, searching with / Searching with XPath
    • XPath conditions / XPath conditions
    • script, writing / Pulling it together
  • secure file transfer protocol (SFTP) / Transferring files through SFTP
    • files, transferring through / Transferring files through SFTP
  • Secure Socket Layer (SSL) / Securing sockets with TLS/SSL
  • security
    • about / A note on security
    • Cross-site scripting (XSS) / XSS
    • Cross-Site Request Forgery (CSRF) / CSRF
  • server name indication (SNI) support / Securing sockets with TLS/SSL
  • simple echo client
    • about / A simple echo client
  • simple echo server
    • about / A simple echo server, The server itself
    • received data, handling / Handling the received data
  • Simple Object Access Protocol (SOAP) / Layer 5 – The application layer
  • SMTP
    • about / E-mail terminologies
    • e-mail, sending with / Sending e-mails with SMTP
    • e-mail message, composing / Composing an e-mail message
    • e-mail message, sending / Sending an e-mail message
  • SNMP
    • about / Fetching Simple Network Management Protocol data
    • data, fetching / Fetching Simple Network Management Protocol data
    • packets, inspecting / Inspecting SNMP packets
  • socket family / Working with TCP sockets
  • sockets
    • basics / Basics of sockets
    • securing, with TLS/SSL / Securing sockets with TLS/SSL
  • socket type / Working with TCP sockets
  • some style
    • adding / Adding some style
  • source port number
    • about / Network ports
  • spoofing
    • about / User agents
  • SSH
    • about / Secure shell – access using Python
    • accessing, Python used / Secure shell – access using Python
    • packets, inspecting / Inspecting the SSH packets
  • SSL
    • about / Sending e-mails securely with TLS
  • ssl_wrap_socket() function
    • sock parameter / Securing sockets with TLS/SSL
    • keyfile parameter / Securing sockets with TLS/SSL
    • certfile parameter / Securing sockets with TLS/SSL
    • cert_reqs parameter / Securing sockets with TLS/SSL
    • ca_certs parameter / Securing sockets with TLS/SSL
    • server_hostname parameter / Securing sockets with TLS/SSL
    • ssl_version parameter / Securing sockets with TLS/SSL
  • standard SSL client/server communication
    • inspecting / Inspecting standard SSL client/server communication
  • stat() method
    • about / Retrieving e-mails by using POP3 with poplib
  • stateless protocol
    • about / Cookies
  • static content / What's in a web server?
  • status / Sending a reply
  • status codes
    • about / Status codes
    • URL / Status codes
  • streaming APIs
    • about / Polling and the Twitter streaming APIs
  • subnet
    • about / Routing with IP
  • subnet mask
    • about / Routing with IP
  • synchronization primitive / Locks

T

  • TCP/IP networks
    • about / An introduction to TCP/IP networks
    • IP addresses / IP addresses
    • network interfaces / Network interfaces
    • IP addresses, assigning / Assigning IP addresses
    • IP addresses, on Internet / IP addresses on the Internet
    • packets / Packets
    • networks / Networks
    • routing, with IP / Routing with IP
    • DNS / DNS
    • protocol stack / The protocol stack or why the Internet is like a cake
    • layer 4 / Layer 4 – TCP and UDP
    • layer 5 / Layer 5 – The application layer
  • TCP/IP networks, programming
    • firewall / Firewalls
    • Network Address Translation (NAT) / Network Address Translation
    • IPv6 / IPv6
  • TCP port forwarding
    • about / TCP port forwarding
  • TCP sockets
    • working with / Working with TCP sockets
    • client/server communications, inspecting / Inspecting the client/server communication
    • TCP servers / TCP servers
    • client/server interaction, inspecting / Inspecting client/server interaction
  • template designer documentation
    • URL / Templating
  • templating
    • about / Templating
  • threading
    • about / Threading and the GIL
  • threads
    • about / Multithreading and multiprocessing
    • URL / Threading and the GIL
  • thread safe / Queues
  • TLS
    • e-mail, sending with / Sending e-mails securely with TLS
    • about / Sending e-mails securely with TLS
  • Tornado
    • URL / Web frameworks
  • Transmission Control Protocol (TCP)
    • about / Layer 4 – TCP and UDP, TCP
  • Transport Layer Security (TLS) / Securing sockets with TLS/SSL
  • TurboGears
    • URL / Web frameworks
  • Twitter API
    • about / The Twitter API
    • URL / The Twitter API
    • Twitter world clock / A Twitter world clock
    • authentication / Authentication for Twitter
    • tweets, polling for / Polling for Tweets
    • tweets, processing / Processing the Tweets
    • rate limits / Rate limits
    • reply, sending / Sending a reply
    • final touches / Final touches
  • Twitter streaming APIs
    • about / Polling and the Twitter streaming APIs
    • alternative oAuth flows / Alternative oAuth flows

U

  • UDP sockets
    • working with / Working with UDP sockets
  • UdpTransportTarget() parameter / Fetching Simple Network Management Protocol data
  • upstream
    • about / Networks
  • URLs
    • about / URLs
    • path URLs / Paths and relative URLs
    • absolute URL / Paths and relative URLs
    • relative URLs / Paths and relative URLs
    • query string / Query strings
    • URL encoding / URL encoding
    • in summary / URLs in summary
  • user agents
    • about / User agents
    • URL / Choosing a User Agent
  • User Datagram Protocol (UDP)
    • about / Layer 4 – TCP and UDP, UDP
    • versus Transmission Control Protocol (TCP) / UDP versus TCP

V

  • views / Flask – a microframework

W

  • web framework
    • about / Web frameworks
    • basic services / Web frameworks
  • webmaster
    • about / With great power...
    • user agent, selecting / Choosing a User Agent
    • Robots.txt file / The Robots.txt file
  • web server / Client and server
    • about / What's in a web server?
  • Web Services Gateway Interface (WSGI) protocol / WSGI
  • Wireshark
    • about / Wireshark
    • installing / Installation
    • URL / Installation
    • URL, for wiki / Installation
    • packets, capturing / Capturing some packets
    • filtering / Filtering
    • packets, inspecting / Inspecting packets
    • versatile tool / A versatile tool

X

  • XML API
    • about / Getting started with XML
    • approaches / The XML APIs
    • ElementTree / The basics of ElementTree
  • XML parsing, Amazon S3 API / Parsing XML and handling errors
  • XSS (Cross-site scripting) / XSS
    • URL / CSRF
lock icon The rest of the chapter is locked
arrow left Previous Section
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime
Visually different images