I want to execute a curl with command in python.
Usually, I just need enter the command in terminal and press return key.
The command shows below:
curl -H "`oauth2l header --json key.json mobileinsights`" https://mobileinsights.googleapis.com/v2/networks
The result is in json format.
subprocessto runoauth2l header --json key.json mobileinsightsfrom Python... Then use whatever HTTP library in python to pass a header