5th Module
5th Module
Networked programs
HyperText Transfer Protocol - HTTP, The world’s simplest web browser, Retrieving
an image over HTTP, Retrieving web pages with urllib, Reading binary files using
urllib, Parsing HTML and scraping the web, Parsing HTML using regular expressions,
Parsing HTML using BeautifulSoup, Bonus section for Unix / Linux users.
Using Web Services
eXtensible Markup Language - XML, Parsing XML, Looping through nodes
,JavaScript Object
Notation - JSON, Parsing JSON, Application Programming Interfaces, Security and
API usage.
Using databases and SQL
What is a database?, Database concepts, Database Browser for SQLite, Creating a
database table, Structured Query Language summary , Spidering Twitter using a
database, Basic data modeling, Programming with multiple tables ,Three kinds of
keys ,Using JOIN to retrieve data.
NETWORKED PROGRAMS
• HyperText Transfer Protocol (HTTP)
• HTTP (HyperText Transfer Protocol) is the
media through which we can retrieve web-
based data.
The World’s Simplest Web Browser
• The built-in module socket of Python
facilitates the programmer to make network
connections and to retrieve data over those
sockets in a Python program.
• Socket is bidirectional data path to a remote
system.
• A socket is much like a file, except that a
single socket provides a two-way connection
between two programs.
Program to retrieve the data from a
web page.
Socket Programming
Socket programming is a way of connecting two nodes on a
network to communicate with each other.
nclude the socket module –
import socket
Syntax:
socket.socket(socket_family, socket_type, protocol=0)
Where,