How do I make a PATCH request in Python?

Ricardo Augusto picture Ricardo Augusto · Jul 28, 2011 · Viewed 19.3k times · Source

Is there a way to make a request using the PATCH HTTP method in Python?

I tried using httplib, but it doesn't accept PATCH as method param.

Answer

Kenneth Reitz picture Kenneth Reitz · Aug 18, 2011

With Requests, making PATCH requests is very simple:

import requests

r = requests.patch('http://httpbin.org/patch')