Popular Python recipes tagged "multipart"http://code.activestate.com/recipes/langs/python/tags/multipart/2014-03-08T17:34:38-08:00ActiveState Code RecipesComposing a POSTable HTTP request with multipart/form-data Content-Type to simulate a form/file upload. (Python) 2014-03-08T17:34:38-08:00István Pásztorhttp://code.activestate.com/recipes/users/4189380/http://code.activestate.com/recipes/578846-composing-a-postable-http-request-with-multipartfo/ <p style="color: grey"> Python recipe 578846 by <a href="/recipes/users/4189380/">István Pásztor</a> (<a href="/recipes/tags/field/">field</a>, <a href="/recipes/tags/file/">file</a>, <a href="/recipes/tags/form/">form</a>, <a href="/recipes/tags/html/">html</a>, <a href="/recipes/tags/httpclient/">httpclient</a>, <a href="/recipes/tags/mime/">mime</a>, <a href="/recipes/tags/multipart/">multipart</a>, <a href="/recipes/tags/post/">post</a>, <a href="/recipes/tags/upload/">upload</a>, <a href="/recipes/tags/web/">web</a>). Revision 5. </p> <p>This code is useful if you are using a http client and you want to simulate a request similar to that of a browser that submits a form containing several input fields (including file upload fields). I've used this with python 2.x.</p> Encode multipart form data for uploading files via POST (Python) 2013-09-22T21:27:24-07:00Ben Hoythttp://code.activestate.com/recipes/users/4170919/http://code.activestate.com/recipes/578668-encode-multipart-form-data-for-uploading-files-via/ <p style="color: grey"> Python recipe 578668 by <a href="/recipes/users/4170919/">Ben Hoyt</a> (<a href="/recipes/tags/form/">form</a>, <a href="/recipes/tags/http/">http</a>, <a href="/recipes/tags/multipart/">multipart</a>, <a href="/recipes/tags/upload/">upload</a>). </p> <p>This function lets you encode form fields <em>and</em> files in multipart/form-data format for uploading files via HTTP POST.</p> send a multipart email (Python) 2009-10-15T13:56:10-07:00Trent Mickhttp://code.activestate.com/recipes/users/4173505/http://code.activestate.com/recipes/576931-send-a-multipart-email/ <p style="color: grey"> Python recipe 576931 by <a href="/recipes/users/4173505/">Trent Mick</a> (<a href="/recipes/tags/email/">email</a>, <a href="/recipes/tags/multipart/">multipart</a>, <a href="/recipes/tags/smtp/">smtp</a>). Revision 2. </p> <p>A simple function to send an email (can specify text and html parts).</p> <p>See also: <a href="http://code.activestate.com/recipes/576824/">Recipe 576824</a> (send via Gmail's SMTP server), <a href="http://code.activestate.com/recipes/576858/">Recipe 576858</a> (more complex, but supports attachments).</p>