<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="../assets/xml/rss.xsl" media="all"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>chris' random ramblings (Posts about poster)</title><link>https://atlee.ca/</link><description></description><atom:link href="https://atlee.ca/categories/poster.xml" rel="self" type="application/rss+xml"></atom:link><language>en</language><lastBuildDate>Sat, 22 Feb 2025 20:04:32 GMT</lastBuildDate><generator>Nikola (getnikola.com)</generator><docs>http://blogs.law.harvard.edu/tech/rss</docs><item><title>poster 0.7.0 released!</title><link>https://atlee.ca/posts/blog20101023poster-0-7-0-released/</link><dc:creator>chris</dc:creator><description>&lt;p&gt;I've just pushed poster 0.7.0 to the &lt;a href="http://pypi.python.org/pypi/poster/0.7.0"&gt;cheeseshop&lt;/a&gt;.


Thanks again to everybody who sent in bug reports, and for letting me know how you're using poster!  It's really great to hear from users.



poster 0.7.0 fixes a few problems with 0.6.0, most notably:

&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Added callback parameters to MutipartParam and multipart_encode so you can add progress indicators to your applications.  Thanks to Ludvig Ericson for the suggestion.

&lt;/li&gt;

&lt;li&gt;Fixed a bug where posting to a url that returned a 401 code would hang. Thanks to Patrick Guido and Andreas Loupasakis for the bug reports.&lt;/li&gt;

&lt;li&gt;MultipartParam.from_params will now accept MultipartParam instances as the values of a dict object passed in.  The parameter name must match the key corresponding to the parameter in the dict.  Thanks to Matthew King for the suggestion.&lt;/li&gt;

&lt;li&gt;poster now works under python2.7&lt;/li&gt;

&lt;/ul&gt;



poster 0.7.0 can be downloaded from the &lt;a href="http://pypi.python.org/pypi/poster/0.7.0"&gt;cheeseshop&lt;/a&gt;, or from &lt;a href="https://atlee.ca/software/poster/dist/0.7.0/"&gt;my website&lt;/a&gt;.  Documentation can be found at &lt;a href="https://atlee.ca/software/poster/"&gt;https://atlee.ca/software/poster/&lt;/a&gt;



I'm planning on looking at python 3 compatibility soon.



Also, if anybody has suggestions on a reliable way to test the streaming http code, I'm open to suggestions!  My current methods result in intermittent failures because of the test harness I suspect.



poster's code is now available on &lt;a href="http://bitbucket.org/chrisatlee/poster"&gt;bitbucket&lt;/a&gt;.</description><category>linux</category><category>package</category><category>poster</category><category>python</category><category>technology</category><category>utilities</category><guid>https://atlee.ca/posts/blog20101023poster-0-7-0-released/</guid><pubDate>Sat, 23 Oct 2010 15:04:13 GMT</pubDate></item><item><title>poster 0.6.0 released</title><link>https://atlee.ca/posts/blog20100510poster-0-6-0-released/</link><dc:creator>chris</dc:creator><description>&lt;p&gt;I've just pushed poster 0.6.0 to the &lt;a href="http://pypi.python.org/pypi/poster/0.6.0"&gt;cheeseshop&lt;/a&gt;.


Thanks again to everybody who sent in bug reports, and for letting me know how you're using poster!  It's really great to hear from users.



poster 0.6.0 fixes a few problems with 0.5, most notably:

&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Documentation updates to clarify some common use cases.&lt;/li&gt;

&lt;li&gt;Added a poster.version attribute.  Thanks to &lt;a href="http://jcalderone.livejournal.com/54911.html"&gt;JP!&lt;/a&gt;&lt;/li&gt;

&lt;li&gt;Fix for unicode filenames. Thanks to Zed Shaw.&lt;/li&gt;

&lt;li&gt;Handle StringIO file objects. Thanks to Christophe Combelles.&lt;/li&gt;

&lt;/ul&gt;



poster 0.6.0 can be downloaded from the &lt;a href="http://pypi.python.org/pypi/poster/0.6.0"&gt;cheeseshop&lt;/a&gt;, or from &lt;a href="https://atlee.ca/software/poster/dist/0.6.0/"&gt;my website&lt;/a&gt;.  Documentation can be found at &lt;a href="https://atlee.ca/software/poster/"&gt;https://atlee.ca/software/poster/&lt;/a&gt;</description><category>linux</category><category>package</category><category>poster</category><category>python</category><category>technology</category><category>utilities</category><guid>https://atlee.ca/posts/blog20100510poster-0-6-0-released/</guid><pubDate>Tue, 11 May 2010 01:23:36 GMT</pubDate></item><item><title>poster 0.5 released</title><link>https://atlee.ca/posts/blog20091007poster-0-5-released/</link><dc:creator>chris</dc:creator><description>&lt;p&gt;I've just released version 0.5 of &lt;a href="https://atlee.ca/software/poster/"&gt;poster&lt;/a&gt;, the streaming http upload library for python.  It's easy_installable or downloadable directly from the &lt;a href="http://pypi.python.org/pypi/poster/"&gt;cheeseshop&lt;/a&gt;.


Thanks again to everybody who's written in with bug fixes and suggestions!&lt;/p&gt;</description><category>linux</category><category>poster</category><category>python</category><category>technology</category><guid>https://atlee.ca/posts/blog20091007poster-0-5-released/</guid><pubDate>Wed, 07 Oct 2009 11:54:47 GMT</pubDate></item><item><title>poster 0.4 released</title><link>https://atlee.ca/posts/blog20090405poster-04-released/</link><dc:creator>chris</dc:creator><description>&lt;p&gt;I'm happy to announce the release of &lt;a href="https://atlee.ca/software/poster"&gt;poster&lt;/a&gt; version 0.4.


This is a bug fix release, which fixes problems when trying to use poster over a secure connection (with https).



I've also reworked some of the code so that it can hopefully work with python 2.4.  It passes all the unit tests that I have under python 2.4 now, but since I don't normally use python 2.4, I'd be interested to hear other people's experience using it.



One of the things that I love about working on poster, and about open source software in general, is hearing from users all over the world who have found it helpful in some way.  It's always encouraging to hear about how poster is being used, so thank you to all who have e-mailed me!



poster can be downloaded from my &lt;a href="https://atlee.ca/software/poster/dist/0.4/"&gt;website&lt;/a&gt;, or from the &lt;a href="http://pypi.python.org/pypi/poster/0.4"&gt;cheeseshop&lt;/a&gt;. 



As always, bug reports, comments, and questions are always welcome.&lt;/p&gt;</description><category>linux</category><category>my software</category><category>opensource</category><category>poster</category><category>python</category><category>technology</category><guid>https://atlee.ca/posts/blog20090405poster-04-released/</guid><pubDate>Sun, 05 Apr 2009 18:23:53 GMT</pubDate></item><item><title>poster 0.2 is out</title><link>https://atlee.ca/posts/blog20081205poster-02-is-out/</link><dc:creator>chris</dc:creator><description>&lt;p&gt;I've fixed a few bugs with &lt;a href="https://atlee.ca/software/poster"&gt;poster&lt;/a&gt;, and released the next version, 0.2.  It's available from the &lt;a href="http://pypi.python.org/pypi/poster/0.2"&gt;cheeseshop&lt;/a&gt;, or from my &lt;a href="https://atlee.ca/software/poster/dist/0.2/"&gt;web page&lt;/a&gt;.


Documentation can also be found &lt;a href="https://atlee.ca/software/poster"&gt;here&lt;/a&gt;.&lt;/p&gt;</description><category>general</category><category>linux</category><category>poster</category><category>python</category><category>technology</category><guid>https://atlee.ca/posts/blog20081205poster-02-is-out/</guid><pubDate>Fri, 05 Dec 2008 16:36:28 GMT</pubDate></item><item><title>Announcing poster 0.1</title><link>https://atlee.ca/posts/blog20080703announcing-poster-01/</link><dc:creator>chris</dc:creator><description>&lt;p&gt;I've just uploaded the first public release of &lt;a href="https://atlee.ca/software/poster"&gt;poster&lt;/a&gt; to my website, and to the &lt;a href="http://pypi.python.org/pypi/poster/0.1"&gt;cheeseshop&lt;/a&gt;.


I wrote poster to scratch an itch I've had with Python's standard library: it's hard to do HTTP file uploads.  There are a few reasons for this, one is that the standard library doesn't provide a way to do multipart/form-data encoding, and the second reason is that there's no way to stream an upload to the remote server, you have to build the entire request in memory first before sending the request.



poster addresses both these issues.  The poster.encode module provides multipart/form-data encoding, and the poster.streaminghttp module provides streaming http request support.



Here's an example of how you might use it:

&lt;/p&gt;&lt;pre lang="python"&gt;

# test_client.py

from poster.encode import multipart_encode

from poster.streaminghttp import register_openers

import urllib2



# Register the streaming http handlers with urllib2

register_openers()



# Start the multipart/form-data encoding of the file "DSC0001.jpg"

# "image1" is the name of the parameter, which is normally set

# via the "name" parameter of the HTML &lt;input&gt; tag.



# headers contains the necessary Content-Type and Content-Length

# datagen is a generator object that yields the encoded parameters

datagen, headers = multipart_encode({"image1": open("DSC0001.jpg")})



# Create the Request object

request = urllib2.Request("http://localhost:5000/upload_image", datagen, headers)

# Actually do the request, and get the response

print urllib2.urlopen(request).read()

&lt;/pre&gt;



Download it as a &lt;a href="https://atlee.ca/software/poster/dist/0.1/poster-0.1.tar.gz"&gt;tarball&lt;/a&gt; or &lt;a href="https://atlee.ca/software/poster/dist/0.1/poster-0.1-py2.5.egg"&gt;egg&lt;/a&gt; for python 2.5, or easy_install it from &lt;a href="http://pypi.python.org/pypi/poster/0.1"&gt;cheeseshop&lt;/a&gt;.



Bugs, patches, comments or complaints are welcome!</description><category>poster</category><category>python</category><category>technology</category><guid>https://atlee.ca/posts/blog20080703announcing-poster-01/</guid><pubDate>Thu, 03 Jul 2008 18:46:21 GMT</pubDate></item></channel></rss>