Python Twitter Tools
====================
- [![Build Status](https://travis-ci.org/sixohsix/twitter.svg)](https://travis-ci.org/sixohsix/twitter)
+ [![Build Status](https://travis-ci.org/sixohsix/twitter.svg)](https://travis-ci.org/sixohsix/twitter) [![Coverage Status](https://coveralls.io/repos/sixohsix/twitter/badge.png?branch=master)](https://coveralls.io/r/sixohsix/twitter?branch=master)
The Minimalist Twitter API for Python is a Python API for Twitter,
everyone's favorite Web 2.0 Facebook-style status updater for people
# Send a tweet with an image included (or set your banner or logo similarily)
# by just reading your image from the web or a file in a string:
+# Note that the text sent as status along with the picture must be unicode.
+status = u"PTT ★" # or with python 3: status = "PTT ★"
with open("example.png", "rb") as imagefile:
- params = {"media[]": imagefile.read(), "status": "PTT"}
+ params = {"media[]": imagefile.read(), "status": status}
t.statuses.update_with_media(**params)
# Or by sending a base64 encoded image:
-params = {"media[]": base64_image, "status": "PTT", "_base64": True}
+params = {"media[]": base64_image, "status": status, "_base64": True}
t.statuses.update_with_media(**params)
```
The `block` parameter sets the stream to be fully non-blocking. In
this mode, the iterator always yields immediately. It returns
stream data, or `None`. Note that `timeout` supercedes this
- argument, so it should also be set `None` to use this mode.
+ argument, so it should also be set `None` to use this mode,
+ and non-blocking can potentially lead to 100% CPU usage.
Twitter Response Objects
------------------------