How to make requests.post not to wrap dict values in arrays in python?
<p>I use python requests.post function to send json queries to my django app.</p>

<pre><code>r = requests.post(EXTERNAL_SERVER_ADDRESS, data={'123':'456', '456':'789'})
</code></pre>

<p>But on the external server request.POST object looks like this:</p>

<p><code>&lt;QueryDict: {'123': ['456'], '456': ['789']}&gt;</code></p>

<p>Why does it happen? How can I just send a dict?</p>

<p>You are sending a dict, Django transform this JSON in this QueryDict objetc automatically when it receives the message. If you want to parse it to an dict, do:</p>

<pre><code>myDict = dict(queryDict.iterlists())
</code></pre>

python json python-requests