Preface

Python is one of the evolving language of our era, and it's gaining a lot of attention these days. It is one of the powerful and flexible open source languages instilled with powerful libraries. For every python developer, Requests is the library that comes to mind first when he/she needs to interact with the Web. With its batteries included Requests turned the process of interacting with Web a cakewalk and stands as one of the world's best client with more than 42 million downloads.

With the rise of social media, APIs turn to be a must have part of every application, and interacting with them in the best way possible is going to be a challenge. Getting to know how to interact with APIs, building an API, scraping the web, and such stuff will help every budding web developer to reach new heights.

What this book covers

Chapter 1, Interacting with the Web Using Requests, covers topics such as why Requests is better than urllib2, how to make a simple request, different types of response content, adding custom headers to our Requests, dealing with form encoded data, using the status code lookup, locating the request redirection, location, and timeouts.

Chapter 2, Digging Deep into Requests, talks about using session objects. It discusses the structure of request and response, prepared Requests, SSL verification with Requests, streaming uploads, generators, and event hooks. This chapter also demonstrates using proxies, link headers, and transport headers.

Chapter 3, Authenticating with Requests, introduces you to the different types of procedures that are in practice for authentication. You will gain knowledge on authenticating with OAuth1, digest authentication, and basic authentication.

Chapter 4, Mocking HTTP Requests Using HTTPretty, covers HTTPretty along with its installation and usage. Then, we deal with real-time examples and learn how to mimic the actions of a server using Python Requests and HTTPretty.

Chapter 5, Interacting with Social Media Using Requests, covers significant ground. Starting with an introduction to the Twitter API, Facebook API, and reddit API, we will move on to discover ways in which we can obtain keys, create an authentication request, and work with various examples to interact with social media.

Chapter 6, Web Scraping with Python Requests and BeautifulSoup, empowers you to have a better understanding of the libraries that are used in scraping the Web. You will also be introduced to using the BeautifulSoup library, its installation, and procedures to scrape the web using Python Requests and BeautifulSoup.

Note

We would like to thank www.majortests.com for allowing us to base the examples in this chapter around their website.

Chapter 7, Implementing a Web Application with Python Using Flask, gives an introduction to the Flask framework and moves on to discuss how to develop a simple Survey application which deals with creating, listing and voting various questions. In this chapter you will acquire all the knowledge required to build a web application using Flask.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.147.27.131