Production Ready Requests
Despite having lots of this documented in python-requests today, I thought a blog post linking to various parts of the documentation and tying it all together with all the necessary caveats would be helpful.
Despite having lots of this documented in python-requests today, I thought a blog post linking to various parts of the documentation and tying it all together with all the necessary caveats would be helpful.
python-requests has been around for a long time. I've been a maintainer for many years and I share some retrospective thoughts on the project
Lessons learned, regrets, and more from over a decade working on an API library
Back in December, when I released rush, I struggled to figure out the appropriate way to signal that the library was shipping with type annotations built-in. I've also been working on adding type annotation stub files to github3.py as a result, I've had to look around quite a bit …
Recently, I had the (genuine) joy of helping port a Python library with a C extension to work on Python 2 and Python 3. C was my first language that I really understood pretty well and I have some (possibly misplaced) nostalgia for the time when I only ever wrote …
Every API client is different. They are shaped by many things, including:
People have told me that they love github3.py and how I designed it. Personally, I feels there is room for significant …
Today, I released Flake8 3.0.0b1. You can try it out by running:
pip install --pre flake8
This marks the start of the culmination of several months worth of work and a couple years of hammock driven development (mostly spent ruminating). You can read about the list of changes …
Tonight marks the release of Betamax 0.5.0. Beyond just reworking the documentation, it also marks the addition of two integrations with popular testing frameworks. Betamax now ships with a pytest fixture that provides an instantiated Session that is being recorded by Betamax. Let's look at how we might …
tl;dr pep8's repository has moved from Johann Rocholl's account to the Python Code-Quality Authority organization.
It's my great pleasure to announce that the pep8 project has moved to the PyCQA organization on GitHub and will hopefully enjoy an expanded team of maintainers as a result. This comes after …
This year I gave the talk "Cutting Off the Internet: Testing Applications that Use Requests" at PyTennessee and PyCon. The recording of the talk is already online with my slides.
At the end of my talk, I promised to write a blog post going into far more detail and covering …
You may have already heard about this, but Guido van Rossum has co-authored PEP 484 [1] to standardize a basic set of Type Hints. If you've heard of PEP 484 already, this probably isn't the one-line summary you've heard about. In fact, if you've heard about this already, you've probably …
This year was my second year attending PyCon North America (a.k.a., PyCon US) and once again I loved every second of it.
tl;dr I didn't see a lot of talks in person but I spoke to a large number of people this year and made some great …
It is my distinct pleasure to announce the 0.4.0 release of the requests toolbelt. This version comes almost a year after the release of 0.3.1.
A lot of work was put into the toolbelt in those 10 months though. We reorganized the documentation to make it …
Lately, I found a new amount of energy and decided to help SQLObject add compatibility with Python 3. If you look at the Python 3 Wall of Superpowers you will notice that currently SQLObject is currently listed as Python 2 only (which is indicated by the lock symbol). While talking …
On August 2nd, 2013 I opened issue 122 on github3.py's issue tracker. The driving force behind the "Roadmap for 1.0" was to clean up an API that I fundamentally disliked. Yesterday, on December 7th, 2014, I released the first alpha version of 1.0. The following is …
This is the second in what I hope will be a series of explorations of advanced features in requests.
Websites and servers sometimes, misbehave. They can misbehave in a number of ways:
What most people don't know is that …
This is the first in what I hope will be a series of explorations of advanced and lesser known features in requests.
Recently, the requests team released version 2.4.3. In this version, we had a very significant new feature released that was contributed by Carol Willing. It has …
tl;dr Flake8 development has moved to GitLab and has a mirror on GitHub. Please send all further bug reports and pull requests to the GitLab repository.
Recently I started a discussion on the code quality mailing list about moving Flake8 from Mercurial to Git and to …
tl;dr dispatch_hook now sends the keyword arguments that were originally sent with the request. Hook authors should modify their hooks to accept them and resend them.
This morning Kenneth published (on PyPI and Crate) requests 1.2.0 which included a lot of very important changes. One, which will …
I'm just going to collect some useful one-liners that I've either made myself or found elsewhere. I think some of these might benefit some people I know, so there may be follow up posts to add more.
This requires requests but it could probably be done …
After mostly finishing github3.py[1] I started writing the unittests for the library. I waited until the end because I knew I wanted to test directly against the API. To do that, I needed to make sure I had all the functionality that would return the proper objects to …
So a friend of mine is learning python and was fooling around in the interactive console. They accidentally ran:
'str' > 19
# But they meant to run
'str' > '19'
Can you guess what that evaluated to? Conventional thought would suggest a TypeError, but in fact that evaluates to True. Odd right …
I've just had a few things kicking around in my head lately and I thought I'd jot them down.
With the exception of paginated calls, github3.py is essentially feature complete but is lacking tests for everything. My plan as of this point in time is to finish …
I previously mentioned my work on github3.py and how I was having trouble creating downloads on GitHub because they use Amazon's S3 service for the uploaded files. What this means is that first you have to "create" the download on GitHub then you have to upload the actual file …
While testing github3.py by hand, I found myself wanted to delete objects that I created as a test from an array after deleting them on GitHub. To do that, I have to do:
gists[index].delete() del gists[index]
So my initial instinct was to modify the __del__ method …