from curl to python code example
Example 1: Curl in python
import requests
headers = {
'Content-type': 'application/json',
}
data = '{"text":"Hello, World!"}'
response = requests.post('https://hooks.slack.com/services/asdfasdfasdf', headers=headers, data=data)
Example 2: python run curl
import requests
res = requests.get('https://stackoverflow.com/questions/26000336')
Example 3: executing curl commands in python
import requests
r = requests.get('https://github.com/timeline.json')
r.json()