The requests library is the de facto standard for making HTTP requests in Python. It abstracts the complexities of making requests behind a beautiful, simple API so that you can focus on interacting with services and consuming data in your application. Throughout this course, you’ll see some of the most useful features that requests has […]
Category: Requests
Python’s Requests Library (Guide)
The requests library is the de facto standard for making HTTP requests in Python. It abstracts the complexities of making requests behind a beautiful, simple API so that you can focus on interacting with services and consuming data in your application. Throughout this article, you’ll see some of the most useful features that requests has […]
Configuring TLS With Requests
A common problem encountered by Requests users is that they need to perform some specific configuration of TLS. This can happen for a number of reasons, but the most common problem is that Requests has a default TLS configuration that is fairly strict. In particular, we recently removed support for all cipher suites that use […]
Requests 2.0
Every now and then the Requests project gets bored of fixing bugs and decides to break a whole ton of your code. But it doesn’t look good when we put it like that, so instead we call it a ‘major release’ and sell it as being full of shiny new features. Unfortunately it turns out […]
Requests: The Difference Between Params and Data
This question pops up a lot on Stack Overflow, on GitHub, and in the IRC channel, so I thought I’d write a short post to address it. The question is, broadly, this: How do I send data on a POST? I tried params, but that didn’t work! The answer is that Requests has two different […]
Python Requests And Proxies
One of Requests’ most popular features is its simple proxying support. HTTP as a protocol has very well-defined semantics for dealing with proxies, and this has lead to widespread deployment of HTTP proxies. The vast majority of these proxies are ‘transparent’: that is, they sit on the message path and quietly capture HTTP messages before […]
Caching In Python Requests
I think I’ve made it clear in the past that I think Requests is awesome. At this stage it’s become a mature, feature-filled library that is more than capable of replacing urllib2 and friends in almost every situation you might be interested in. There are very few things that urllib2 can do that Requests can’t […]
Requests’ Two APIs
Kenneth Reitz’s excellent Requests library has been praised, rightfully, for its excellent API. In fact, its API is so good that it’s been praised in a literary context, as well as by almost every programmer who has come across it. There is no question that this API is one of the best you can find […]
Requests and the HTTP 302 Status Code
I wanted briefly to touch on the behaviour of the Python Requests library when it receives an HTTP 302 message. This has come up a couple of times on GitHub, and has usually been considered a bug, so it’s worth briefly stepping in and explaining what Requests does and why it does it. First, HTTP […]
Choosing The SSL Version In Python Requests
Over the last few months (and probably for quite a while before then too), a few issues have been raised on the Requests GitHub page asking how to select the version of SSL used by Requests. This is actually simple once you know how, so I thought I’d write a short post to show you […]
A Whistlestop Tour of Python Requests
Return to our regularly scheduled technical blogging, I’m going to give a quick overview of one of the software libraries I know best: Kenneth Reitz’s Requests library for the Python programming language. Since I started making minor (and I mean really minor) contributions to the library, I’ve become increasingly familiar with its use and utility, […]