I have this curl command.
This works
curl -O -H "X-Api:3433432" -X GET "https://website.com/file.zip"
Trying to figure it out how to convert it to something python understands.
curl -O -H "X-Api:3433432" -X GET "https://website/file.zip"
Perhaps you're looking for the "Requests" module?
It allows you to create a GET request in a similar way you would use a curl
command.
You can find some documentation at: https://www.w3schools.com/PYTHON/ref_requests_get.asp
Edit: There's also https://curlconverter.com/ which should convert it automatically for you.
try using module requests
:
import requests
headers = {
'X-Api': '3433432',
}
response = requests.get('https://website.com/file.zip', headers=headers)
Firebase Cloud Functions: PubSub, "res.on is not a function"
TypeError: Cannot read properties of undefined (reading 'createMessageComponentCollector')
I am trying to convert some Python code into anexe with PyInstaller
I would like to create a variable (suffix) that prints current year and quarter in this format: '_21_q2' and (previous_suffix) which is simply suffix - 2 quarters in this case: '_21_q2'
I am trying to use NLP techniques to predict the mental status of patients at the time doctor's notes were takenI have two classes, suffix (multilabel) as well as mental_status (binary, Lucid or Delirium)