This is a handy tool to convert curl to the python requests equivalent automatically.
Since chromium-based browsers will generate curl requests from the network tab of devtools, you can use that along with the above to quickly generate code to replay requests with python.