NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
Actively maintained, pure Python wrapper for the Twitter API. Supports both normal and streaming Twitter APIs
Last release 5 years ago
no release in 18 months
Release timing varies
gaps range from 3 weeks to 1.9 years
Some releases are documented
notes for 22 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
17 years old
61 releases · first in 2009
Changes from raising StopIteration to returning instead.
StopIteration to returning instead.Nothing published for this version
Nothing published for this version
One column per quarter.
Nothing published for this version
Bump release with latest patches from GitHub.
Fixes for cursoring API endpoints
html_for_tweet() parsingreturn_pages keyword argumentcreate_metadata endpointImprove replacing of entities with links in html_for_tweet()
html_for_tweet()Added support for "symbols" in Twython.html_for_tweet()
Twython.html_for_tweet()Twython.html_for_tweet()Twython.upload_video()Fix quoted status checks in html_for_tweet
upload_video endpointhtml_for_tweethtml_for_tweet method response when hashtag/mention is a substring of anotherAdded dynamic filtering to streamer
Deprecating update_with_media per Twitter API 1.1
lookup_status function to endpoints.pycursor to return full pages rather than individual resultscursor now uses while loop rather than recursionresponses to mock API calls in testsretry_after attribute to TwythonRateLimitErrorupload_media method to Twython in favor of update_with_mediaupdate_with_media per Twitter API 1.1 (https://dev.twitter.com/rest/reference/post/statuses/update_with_media)requests and requests-oauthlib in requirements.txtTwython.search_gen has been deprecated. Please use twitter.cursor(twitter.search, q='your_query') instead, where twitter is your Twython instance.
requests version to 2.1.0.Exceptions in handlers or on_success which subclass ValueError would previously be caught and reported as a JSON decoding problem, and on_error() would be called (with status_code=200)get_authorized_tokenssetup causing installation to fail on some devices (eg. Nokia N9/MeeGo)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.client_args to the streaming __init__, much like in core Twython (you can pass headers, timeout, hooks, proxies, etc.).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.RequestException is raised, it is caught and a TwythonError is raised instead for convenience.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.get_list_memberships, get_twitter_configuration, get_supported_languages, get_privacy_policy, get_tosauth_endpoint parameter to Twython.__init__ for cases when the right parameters weren't being shown during the authentication step._transparent_params so when passed True or False or an array, etc. Twython formats it to meet Twitter parameter standards (i.e. ['ryanmcgrath', 'mikehelmick', 'twitterapi'] would convert to string 'ryanmcgrath,mikehelmick,twitterapi')Update requests version to 2.1.0.
requests version to 2.1.0.Exceptions in handlers or on_success which subclass ValueError would previously be caught and reported as a JSON decoding problem, and on_error() would be called (with status_code=200)get_authorized_tokenssetup causing installation to fail on some devices (eg. Nokia N9/MeeGo)Twython.search_gen has been deprecated. Please use twitter.cursor(twitter.search, q='your_query') instead, where twitter is your Twython instance.
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.client_args to the streaming __init__, much like in core Twython (you can pass headers, timeout, hooks, proxies, etc.).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.RequestException is raised, it is caught and a TwythonError is raised instead for convenience.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.get_list_memberships, get_twitter_configuration, get_supported_languages, get_privacy_policy, get_tosauth_endpoint parameter to Twython.__init__ for cases when the right parameters weren't being shown during the authentication step._transparent_params so when passed True or False or an array, etc. Twython formats it to meet Twitter parameter standards (i.e. ['ryanmcgrath', 'mikehelmick', 'twitterapi'] would convert to string 'ryanmcgrath,mikehelmick,twitterapi')Removed get_list_memberships, method is Twitter API 1.0 deprecated
twython/twython.py to twython/api.py in attempt to make structure look a little neatergetHomeTimeline is now get_home_timeline)shorten_url. With the requests library, shortening a URL on your own is simple enoughtwitter_token, twitter_secret and callback_url are no longer passed to Twython.__init__
twitter_token and twitter_secret have been replaced with app_key and app_secret respectivelycallback_url is now passed through Twython.get_authentication_tokenstest_twython.py docstrings per http://www.python.org/dev/peps/pep-0257/get_list_memberships, method is Twitter API 1.0 deprecatedendpoints.py now contains EndpointsMixin (rather than the previous api_table dict) for Twython, which enables Twython to use functions declared in the Mixin.obtain_access_token to obtain an OAuth 2 Application Only read-only access tokenconstruct_api_url now accepts keyword arguments like other Twython methods (e.g. instead of passing {'q': 'twitter', 'result_type': 'recent'}, pass q='twitter', result_type='recent')client_args to the Twython __init__ to manipulate request variables. client_args accepts a dictionary of keywords and values that accepted by requests (Session API <http://docs.python-requests.org/en/latest/api/#sessionapi>_) [ex. headers, proxies, verify(SSL verification)] and the "request" section directly below it.get_application_rate_limit_status API method for returning the current rate limits for the specified sourceinvalidate_token API method which allows registed apps to revoke an access token presenting its client credentialsget_lastfunction_header now accepts a default_return_value parameter. This means that if you pass a second value (ex. Twython.get_lastfunction_header('x-rate-limit-remaining', 0)) and the value is not found, it returns your default valueFixed get_lastfunction_header to actually do what its docstring says, returns None if header is not found
search_genget_lastfunction_header to actually do what its docstring says, returns None if header is not found__init__ didn't need to have self.auth and self.headers because they were never used anywhere else but the __init__disconnect method to TwythonStreamer, allowing users to disconnect as they desireTwythonStreamError docstring, also allow importing it from twythonTwythonStreamError when stream line can't be decoded. Instead, sends signal to TwythonStreamer.on_errorFixed TwythonDeprecationWarning on camelCase functions if the camelCase was the same as the PEP8 function (i.e. Twython.retweet did not change)
get_retweeters_ids methodTwythonDeprecationWarning on camelCase functions if the camelCase was the same as the PEP8 function (i.e. Twython.retweet did not change)get_authentication_tokens to accomedate those using OOB authorization (non web clients)__repr__ definition for Twython, when calling only returning <Twython: APP_KEY>Twython.construct_api_url, uses "transparent" parameters (see 4th bullet in this version for explaination)requests and requests-oauthlib requirements, fixing posting files AND post data together, making authenticated requests in general in Python 3.3"PEP8" all the functions. Switch functions from camelCase() to underscore_funcs(). (i.e. updateStatus() is now update_status())
updateStatus() is now update_status())Fixed streaming issue #144, added TwythonStreamer to aid users in a friendly streaming experience (streaming examples in examples and README's have be
TwythonStreamer to aid users in a friendly streaming experience (streaming examples in examples and README's have been updated as well)Twython now requires requests-oauthlib 0.3.1, fixes #154 (unable to upload media when sending POST data with the file)Added warnings.simplefilter('default') line in twython.py for Python 2.7 and greater to display Deprecation Warnings in console
HISTORY.rst to start tracking history of changestwitter_endpoints.py to endpoints.py for cleanlinesscompat.py for compatability with Python 2.6 and greater__author__ to __init__.pyversion.py to store the current Twython version, instead of repeating it twice -- it also had to go into it's own file because of dependencies of requests and requests-oauthlib, install would fail because those libraries weren't installed yet (on fresh install of Twython)find_packages() from setup.py, only one package (we can just define it)python setup.py publish is faster to type and easier to remember than python setup.py sdist uploadbase_url from endpoints.py because we're just repeating it in Twython.__init__Twython.get_authentication_tokens() now takes callback_url argument rather than passing the callback_url through Twython.__init__, callback_url is only used in the get_authentication_tokens method and nowhere else (kept in init though for backwards compatability)warnings.simplefilter('default') line in twython.py for Python 2.7 and greater to display Deprecation Warnings in consoletwitter_token, twitter_secret and callback_url in Twython.__init__requests isn't greedy about variables that can't be converted to unicode anymorebulkUserLookup (please use lookupUser instead), removed getProfileImageUrl (will be completely removed from Twitter API on May 7th, 2013)requests makes it easy for developers to implement their own url shortening in their app (see https://github.com/ryanmcgrath/twython/issues/184)ssl_verify parameter, defaults True. Set False if you're having development server issues_media_update function, we could have always just used self.postFixed issue where Twython Exceptions were not being logged correctly
Fixed AttributeError when trying to decode the JSON response via Response.json()
AttributeError when trying to decode the JSON response via Response.json()Fixed destroyDirectMessage, createBlock, destroyBlock endpoints in twitter_endpoints.py
simplejson dependencydestroyDirectMessage, createBlock, destroyBlock endpoints in twitter_endpoints.pygetProfileBannerSizes method to twitter_endpoints.pyget_authorized_tokensupdateProfileBannerImage to use v1.1 endpoint- New showOwnedLists method
showOwnedLists methodNothing published for this version
Updated twitter_endpoints.py to better reflect order of API endpoints on the Twitter API v1.1 docs site
twitter_endpoints.py to better reflect order of API endpoints on the Twitter API v1.1 docs siteNothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Your coding agent can read these notes before it upgrades. Set up the MCP server →