10/Python and
the Internet
Python has a very active community of de-
velopers who often share their work in the
form of open-source libraries that simpli-
fy complex tasks.Some of these libraries
make it relatively easy for us to connect our
projects to the internet to do things like get-
ting data about the weather, send an email
or text message, follow trends on Twitter,
or act as a webserver.
In this chapter, we’re going to take a look at a few ways to create
internet-connected projects with the Raspberry Pi. We’ll start by
showing you how to fetch data from the internet and then move
into how you can create your own Raspberry Pi-based webserver.
Download Data from a Web Server
When you type an address into your web bro ...