 <p>Traditionally you would create a <code>cgi.FieldStorage</code> object, which reads stdin (usually - there are CGI standards about what it does and when). That's a bit passé nowadays. <code>Urlparse.parse_qs</code> is designed to convert from form data to dict:</p> <pre><code>&gt;&gt;&gt; import urlparse &gt;&gt;&gt; urlparse.parse_qs("prize_id=2&amp;publisher_id=32&amp;foreign_user_id=1234") {'prize_id': ['2'], 'foreign_user_id': ['1234'], 'publisher_id': ['32']} &gt;&gt;&gt; </code></pre>