Home > Articles > Programming > Python

Python Libraries

  • Print
  • + Share This

Internet Protocol and Support

These are the modules that implement internet protocols and support for related technology.

For examples and details about the following modules, refer to Chapters 10–12.

cgi

The cgi module is used to implement CGI (common gateway interface) scripts and process form handling in Web applications that are invoked by an HTTP server.

See Chapter 12, "Scripting Programming," for details.

urllib

The urllib module is a high-level interface to retrieve data across the World Wide Web. It opens any URL using sockets.

See Chapters 10 and 12 for details.

httplib

The httplib module implements the client side of the HTTP (Hypertext Transfer Protocol) protocol.

TIP

HTTP is a simple text-based protocol used for World Wide Web applications.

See Chapters 10 and 12 for details.

ftplib

The ftplib module implements the client side of the FTP protocol. You can use it for mirroring FTP sites. Usually the urllib module is used as an outer interface to ftplib.

See Chapters 10 and 12 for details.

gopherlib

The gopherlib module is a minimal client-side implementation of the Gopher protocol.

poplib

The poplib module provides a low-level, client-side interface for connecting to a POP3 server using a client protocol, as defined in the Internet standard RFC 1725.

See Chapter 10 for details.

imaplib

The impalib module provides a low-level, client-side interface for connecting to an IMAP4 mail server using the IMAP4rev1 client protocol, as defined in the Internet standard RFC 2060.

See Chapter 10 for details.

nntplib

The nntplib module implements a low-level interface to the client side of the NNTP (Network News Transfer Protocol) protocol—a service mostly known for implementing newsgroups.

See Chapter 10 for details.

smtplib

The smtplib module provides a low-level client interface to the SMTP protocol that can be used to send email to any machine in the Internet that has an SMTP or ESMTP listener daemon.

See Chapter 10 for details.

telnetlib

The telnetlib module implements a client for the telnet protocol.

urlparse

The urlparse module manipulates a URL string, parsing it into tuples. It breaks a URL up into components, combines them back, and converts relative addresses to absolute addresses.

See Chapters 10 and 12 for details.

SocketServer

The SocketServer module exposes a framework that simplifies the task of writing network servers. Rather than having to implement servers using the low-level socket module, this module provides four classes that implement interfaces to the mostly used protocols: TCPServer, UDPServer, UnixStreamServer, and UnixDatagramServer. All these classes process requests synchronously.

See Chapter 10 for details.

BaseHTTPServer

The BaseHTTPServer module defines two base classes for implementing basic HTTP servers (also known as Web servers).

See Chapter 10 for details.

SimpleHTTPServer

The SimpleHTTPServer module provides a simple HTTP server request-handler class. It has an interface compatible with the BaseHTTPServer module that enables it to serve files from a base directory.

See Chapter 10 for details.

CGIHTTPServer

The CGIHTTPServer module defines a simple HTTP server request-handler class. It has an interface compatible with BaseHTTPServer that enables it to serve files from a base directory, but it can also run CGI scripts.

See Chapters 10 and 12 for details.

asyncore

The asyncore module provides the basic infrastructure for writing and handling asyncronous socket service clients and servers that are the result of a series of events dispatched by an event loop.

See Chapter 10 for details.

  • + Share This
  • 🔖 Save To Your Account

Related Resources

There are currently no related titles. Please check back later.