title: Equivalent request command for this curl
body: <p>I have a curl command which is working fine and uploading the file to the server.</p>
  
  <pre><code>curl -v &lt;url&gt; --fail --user &lt;username&gt;:&lt;password&gt; --upload-file filename
  </code></pre>
  
  <p>I have tried the requests module in python. The command I am issuing is </p>
  
  <pre><code>fileobj = open('dist\\test.zip', 'rb')
  requests.put(__url, data={"upload": "upload"}, files={"archive": ("test.zip", fileobj)}, auth=HTTPBasicAuth(username,password))
  </code></pre>
  
  <p>the python request is not working and returning <code>Bad Request</code>, <code>error 400</code>.</p>
  
  <p>What can be the equivalent python command ?</p>