KR


Requests v0.4.0 Released

by Kenneth Reitz.

Requests v0.4.0 was released late last night!

If you're unfamiliar with Requests, it is an HTTP Module for Python that strives to keep things as simple as possible. Learn more.

It is being used internally at Twitter, Inc and The Library of Congress. If your company (or project) is using Requests internally, send me an email!

Since the initial release, 3 months ago, Requests quickly became my most popular Python project. It's approaching 200 Watchers on GitHub, and has a number of happy repetitive users:

Daniel Greenfeld
Nuked a 1200 LOC spaghetti code library with 10 lines of code thanks to @kennethreitz’s request library. Today has been AWESOME!
Kenny Meyers
Python HTTP: When in doubt, or when not in doubt, use Requests. Beautiful, simple, Pythonic.
Rich Leland
Requests is awesome. That is all.
Steve Pike
I can never remember how to do it the regular way. import requests; requests.get() is just so easy!

Community Update

Requests now has it's own documentation website: python-requests.org, hosted by the excellent Read the Docs project. The User and API docs are still a work in progress.

I decided to change the project tagline from "Most Python HTTP Modules suck. This one doesn't." to "Python HTTP Requests for Humans.". While I did enjoy the bit of personality that the previous tagline brought to the project, there's no need for the passive agression. Only Positivity going forward.

New Features

Version 0.4.0 features the new Response.history attribute, which contains a list of requests leading up to the response. If you ask for a URL, and it bounces off of 3x 301 Redirects, those 3 requests will reside in the Response.history atrribute.

Requests now features a wonderful Case-insensitive Header Dictionary, so you can handle unpredictable response headers easily. One server will respond with content-encoding, while another will respond with Content-Encoding. r.header['content-encoding'] will return the proper value in both scenarios.

Requests now transparently supports Unicode URLs (e.g. 'http://ko.wikipedia.org/wiki/위키백과:대문').

We also automatically decompresses GZip'd Encoded responses, without the need to send up an Accept-encoding header.

Urllib2 has a major recursion issue when HTTP BASIC Authentication is required, but bad credentials were provided. Requests now handles this scenario properly.


Follow me on GitHub as kennethreitz.