Twython

Software Screenshot:
Twython
Software Details:
Version: 3.2.0
Upload Date: 13 Apr 15
Developer: Ryan McGrath
Distribution Type: Freeware
Downloads: 32

Rating: 5.0/5 (Total Votes: 1)

Written in pure Python, Twython is a basic wrapper for the official Twitter API.

The library comes with support for OAuth 2 support and easy authentication procedures.

Developers can use to to query for user information, Twitter lists, timeline streams, direct messages and whatever else the official API lets you query for.

It even comes with support for some basic image uploading features, including for tweeting photos, changing the profile banner, changing the profile background image and even the user avatar.

For versions before Python 2.6, the simplejson library needs to be loaded as well.

What is new in this release:

  • PEP8'd some code
  • Added `lookup_status` function to `endpoints.py`
  • Added keyword argument to `cursor` to return full pages rather than individual results
  • `cursor` now uses while loop rather than recursion
  • Fixed issue where Twython was unnecessarily disabling compression
  • Using `responses` to mock API calls in tests
  • Fixed some typos in documentation
  • Added `retry_after` attribute to `TwythonRateLimitError`
  • Added `upload_media` method to `Twython` in favor of `update_with_media`
  • Deprecating `update_with_media` per Twitter API 1.1 (https://dev.twitter.com/rest/reference/post/statuses/update_with_media)
  • Unpin `requests` and `requests-oauthlib` in `requirements.txt`

What is new in version 3.1.0:

  • Added html_for_tweet static method. This method accepts a tweet object returned from a Twitter API call and will return a string with urls, mentions and hashtags in the tweet replaced with HTML.
  • Pass client_args to the streaming __init__, much like in core Twython (you can pass headers, timeout, hooks, proxies, etc.).
  • Streamer has new parameter handlers which accepts a list of strings related to functions that are apart of the Streaming class and start with "on_". i.e. ['delete'] is passed, when 'delete' is received from a stream response; on_delete will be called.
  • When an actual request error happens and a RequestException is raised, it is caught and a TwythonError is raised instead for convenience.
  • Added "cursor"-like functionality. Endpoints with the attribute iter_mode will be able to be passed to Twython.cursor and returned as a generator.
  • Twython.search_gen has been deprecated. Please use twitter.cursor(twitter.search, q='your_query') instead, where twitter is your Twython instance.
  • Added methods get_list_memberships, get_twitter_configuration, get_supported_languages, get_privacy_policy, get_tos
  • Added auth_endpoint parameter to Twython.__init__ for cases when the right parameters weren't being shown during the authentication step.

What is new in version 3.0.0:

  • Changed ``twython/twython.py`` to ``twython/api.py`` in attempt to make structure look a little neater.
  • - Removed all camelCase function access (anything like ``getHomeTimeline`` is now ``get_home_timeline``).
  • - Removed ``shorten_url``. With the ``requests`` library, shortening a URL on your own is simple enough.

What is new in version 2.10.0:

  • Callback URL is optional in get_authentication_tokens to accomedate those using OOB authorization (non web clients)
  • Not part of the python package, but tests are now available along with Travis CI hooks
  • Added __repr__ definition for Twython, when calling only returning <Twython: APP_KEY>
  • Cleaned up Twython.construct_api_url, uses "transparent" parameters (see 4th bullet in this version for explaination)
  • Update requests and requests-oauthlib requirements, fixing posting files AND post data together, making authenticated requests in general in Python 3.3

Requirements:

  • Python 2.6 or higher

Similar Software

goslate
goslate

6 Jun 15

pygeocoder
pygeocoder

13 May 15

BitlyDotNET
BitlyDotNET

6 Jun 15

WePay Ruby SDK
WePay Ruby SDK

6 Jun 15

Comments to Twython

Comments not found
Add Comment
Turn on images!