How do I run a curl command in python
<p>This is the command I am running in <code>bash</code>:</p>

<pre><code>curl -d "username=xxxxxx" -d "password=xxxxx" &lt;&lt;address&gt;&gt; --insecure --silent
</code></pre>

<p>How can I run this using Python?</p>

<p>I hope you don't want to explicitly run <code>curl</code>, but you just want to get the same result.</p>

<pre><code>&gt;&gt;&gt; import requests
&gt;&gt;&gt; r = requests.get('https://example.com', auth=('user', 'pass'), verify=False)
&gt;&gt;&gt; print(r.status_code)
200
</code></pre>

python curl