patch takes kwargs, just pass headers = {your_header}:

def patch(url, data=None, **kwargs):
    """Sends a PATCH request.

    :param url: URL for the new :class:`Request` object.
    :param data: (optional) Dictionary, bytes, or file-like object to send in the body of the :class:`Request`.
    :param \*\*kwargs: Optional arguments that ``request`` takes.
    :return: :class:`Response <Response>` object
    :rtype: requests.Response
    """

    return request('patch', url,  data=data, **kwargs)

So something like this:

head = {"Authorization":"Token token=xxxxxxxxxxxxxxxxxxxxxx"}
url = 'http://0.0.0.0:3000/api/v1/update_experiment.json'
payload = {'expt_name' : 'A60E001', 'status' : 'done' }

r = requests.patch(url, payload, headers=head)
Answer from Padraic Cunningham on Stack Overflow
🌐
GeeksforGeeks
geeksforgeeks.org › python › patch-method-python-requests
PATCH method - Python requests - GeeksforGeeks
July 12, 2025 - This resembles PUT, but the body contains a set of instructions describing how a resource currently residing on the server should be modified to produce a new version. This means that the PATCH body should not just be a modified part of the ...
Discussions

Can't update API using requests.patch
Subreddit for posting questions and asking for general advice about all topics related to learning python · Create your account and connect with a world of communities More on reddit.com
🌐 r/learnpython
17
1
December 14, 2022
Python Requests module JSON format - Stack Overflow
I have a Django application with tastypie set up for REST. I want to be able to update the database using the REST API. I can issue a curl command on the command line to achive what I want, (as ... More on stackoverflow.com
🌐 stackoverflow.com
http - How do I make a PATCH request in Python? - Stack Overflow
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. More on stackoverflow.com
🌐 stackoverflow.com
PATCH update request from python requests library won't work
I am trying to update a record’s attachments field. I am doing this successfully with curl, and also I have python code that successfully pulls records from the table; however when I add code to that which tries the PATCH, I get a “Could not parse request body” 422 response. Below is ... More on community.airtable.com
🌐 community.airtable.com
1
November 20, 2020
🌐
ProxiesAPI
proxiesapi.com › articles › making-partial-updates-with-patch-requests-in-python
Making Partial Updates with PATCH Requests in Python | ProxiesAPI
November 17, 2023 - ... Partial update: Only the changed attributes are sent, not the whole resource. This avoids overhead when making minor changes. Json patch documents: The PATCH request body contains JSON with update operations like "replace", "remove", etc.
🌐
ReqBin
reqbin.com › req › python › 6psxhnzo › patch-request-example
Python | How do I send PATCH request?
January 15, 2023 - To send a PATCH request to the server using Python, you need to use the HTTP PATCH method and include the request data in the body of the HTTP message. The PATCH request method is used to modify a resource on the server partially.
🌐
Requests
requests.readthedocs.io › en › latest › api
Developer Interface — Requests 2.33.1 documentation
Sends a PATCH request. Returns Response object. ... data – (optional) Dictionary, list of tuples, bytes, or file-like object to send in the body of the Request.
🌐
Sarthaks eConnect
sarthaks.com › 3480976 › python-requests-patch-method
Python Requests patch() Method - Sarthaks eConnect | Largest Online Education Community
April 5, 2023 - LIVE Course for free · The patch() method in the Python Requests library is used to send a PATCH request to a specified URL with the data provided in the request
🌐
ProgramCreek
programcreek.com › python › example › 75008 › requests.patch
Python Examples of requests.patch
def patch(self, endpoint, *, headers=None, data=None, verify=False, params=None): """Wrapper for authenticated HTTP PATCH to API endpoint. endpoint = URL (can be partial; for example, 'me/contacts') headers = HTTP header dictionary; will be merged with graphrest's standard headers, which include access token data = HTTP request body verify = the Requests option for verifying SSL certificate; defaults to False for demo purposes. For more information see: http://docs.python-requests.org/en/master/user/advanced/#ssl-csert-verification params = query string parameters Returns Requests response object.
Find elsewhere
🌐
Reddit
reddit.com › r › learnpython › comments › zm1k0c › cant_update_api_using_requestspatch
Can't update API using requests.patch : r/learnpython
December 14, 2022 - Subreddit for posting questions and asking for general advice about all topics related to learning python · Create your account and connect with a world of communities
🌐
Python Examples
pythonexamples.org › python-requests-http-patch
Requests - HTTP PATCH Method - Python Examples
Let us send a PATCH request to the server, get the response, and print out response headers. import requests response = requests.patch('/', data = {'apple':'25', 'banana':'33'}) print(response.headers)
🌐
TutorialsPoint
tutorialspoint.com › requests › requests_handling_post_put_patch_delete_requests.htm
Handling POST, PUT, PATCH and DELETE Requests
import requests myurl = https://postman-echo.com/patch' res = requests.patch(myurl, data="testing patch") print(res.text) E:\prequests>python makeRequest.py {"args":{},"data":{},"files":{},"form":{},"headers":{"x-forwarded- proto":"https" ,"host":"postman-echo.com","content-length":"13","accept":"*/*","accept- encoding ":"gzip, deflate","user-agent":"python-requests/2.22.0","x-forwarded- port":"443" },"json":null,"url":"https://postman-echo.com/patch"}
🌐
Python-requests
docs.python-requests.org › en › latest › api
Developer Interface — Requests 2.33.0 documentation
Sends a PATCH request. Returns Response object. ... data – (optional) Dictionary, list of tuples, bytes, or file-like object to send in the body of the Request.
🌐
ItSolutionstuff
itsolutionstuff.com › post › python-patch-request-with-parameters-exampleexample.html
Python PATCH Request with Parameters Example - ItSolutionstuff.com
October 30, 2023 - Here, we will use requests library to all PATCH HTTP Request and get json response in python program. i will give you very simple example to call PATCH Request with body parameters in python.
🌐
Codecademy
codecademy.com › docs › python › requests module › .patch()
Python | Requests Module | .patch() | Codecademy
August 27, 2025 - The .patch() method in the requests module is used to send a PATCH request to a specified URL, allowing for partial modifications of a resource. When only a subset of data needs to be updated, this method is particularly efficient, as PATCH ...
🌐
Linux Hint
linuxhint.com › python-requests-patch
Python Requests Patch
November 9, 2022 - Linux Hint LLC, [email protected] 1210 Kelly Park Circle, Morgan Hill, CA 95037 Privacy Policy and Terms of Use
🌐
QA Automation Expert
qaautomation.expert › 2024 › 01 › 17 › how-to-test-patch-request-using-python-requests
How to test PATCH Request Using Python Requests – QA Automation Expert
January 17, 2024 - The data dictionary contains the key-value pairs that we want to send in the PATCH request payload. You can modify it based on the requirements of the API we are working with. The response object contains information about the response, including the status code and the response content. ... We are done! Congratulations on making it through this tutorial and hope you found it useful! Happy Learning!! ... Like Loading... Posted in PythonTagged API Testing using Python, Patch Request test in Python, Python, Requests in PythonLeave a comment
🌐
ServiceNow Community
servicenow.com › community › developer-forum › scripted-rest-api-put-and-patch-empty-request-body › td-p › 2462368
Scripted rest api PUT and PATCH, empty request.bod... - ServiceNow Community
January 31, 2023 - Found the obvious: request.body is not a simple object, but rather an instance of RESTAPIRequestBody. I've got confused by the fact that JSON.stringify(request.body) resulted in '{}'.
🌐
Python-requests
docs.python-requests.org › en › latest › api
Developer Interface — Requests 2.33.1 documentation
December 29, 2016 - Sends a PATCH request. Returns Response object. ... data – (optional) Dictionary, list of tuples, bytes, or file-like object to send in the body of the Request.