PackageTrack

PyPI

python-twitter

3.5bear/python-twitter

A Python wrapper around the Twitter API

Release timeline

24 releases since 2007
20072026

One column per quarter.

Releases

  1. 3.53 Nov 2018

    Nothing published for this version

  2. 3.4.27 Jun 2018
    Release notes2 sources agree

    Bugfixes:

    • Allow upload of GIFs with size up to 15mb. See #538

    Open source →
  3. 3.4.110 Mar 2018
    Release notes2 sources agree

    Bugfixes:

    • Fix an issue where twitter.twitter_utils.calc_expected_status_length was failing for python 2 due to a failure to convert a bytes string to unicode. Github issue #546.

    • Documentation fix for twitter.api.Api.UsersLookup. UsersLookup can take a string or a list and properly parses both of them now. Github issues #535 and #549.

    • Properly decode response content for twitter.twitter_utils.http_to_file. Github issue #521.

    • Fix an issue with loading extended_tweet entities from Streaming API where tweets would be truncated when converting to a twitter.models.Status. Github issues #491 and #506.

    Open source →
  4. 3.419 Feb 2018
    Release notes

    version 3.4

    see doc/changelog.rst for release information

    Open source →
    Additional notes2 sources agree

    Deprecations

    • twitter.api.Api.UpdateBackgroundImage. Please make sure that your code does not call this function as it will now return a hard error. There is no replacement function. This was deprecated by Twitter around July 2015.

    • twitter.api.Api.PostMedia has been removed. Please use twitter.api.Api.PostUpdate instead.

    • twitter.api.Api.PostMultipleMedia. Please use twitter.api.Api.PostUpdate instead.

    Open source →
  5. 3.321 May 2017
    Release notes2 sources agree
    • Adds application only authentication. See Twitter's documentation for details. To use application only authentication, pass application_only_auth when creating the Api; the bearer token will be automatically retrieved.

    • Adds function twitter.api.GetAppOnlyAuthToken

    • Adds filter_level keyword argument for twitter.api.GetStreamFilter, twitter.api.GetUserStream

    • Adds proxies keyword argument for creating an Api instance. Pass a dictionary of proxies for the request to pass through, if not specified allows requests lib to use environmental variables for proxy if any.

    • Adds support for quoted_status to the twitter.models.Status model.

    Open source →
  6. 3.2.122 Jan 2017
    Release notes

    Merge pull request #430 from mdenil/master

    Change URL parameter in GetRetweeters to match twitter api.

    Open source →
    Additional notes2 sources agree
    • twitter.twitter_utils.calc_expected_status_length should now function properly. Previously, URLs would be counted incorrectly. See PR #416

    • twitter.api.Api.PostUpdates now passes any keyword arguments on the edge case that only one tweet was actually being posted.

    Open source →
  7. 3.224 Nov 2016
    Release notes

    Version 3.2

    Deprecations

    Nothing is being deprecationed this version, however here's what's being deprecated as of v. 3.3.0:

    • :py:func:twitter.api.Api.UpdateBackgroundImage. Please make sure that your code does not call this function as it will be returning a hard error. There is no replace function. This was deprecated by Twitter around July 2015.
    • :py:func:twitter.api.Api.PostMedia will be removed. Please use :py:func:twitter.api.Api.PostUpdate instead.
    • :py:func:twitter.api.Api.PostMultipleMedia. Please use :py:func:twitter.api.Api.PostUpdate instead.
    • :py:func:twitter.api.GetFriends will no longer accept a cursor or count parameter. Please use :py:func:twitter.api.GetFriendsPaged instead.
    • :py:func:twitter.api.GetFollowers will no longer accept a cursor or count parameter. Please use :py:func:twitter.api.GetFollowersPaged instead.

    What's New

    • We've added new deprecation warnings, so it's easier to track when things go away. All of python-twitter's deprecation warnings will be a subclass of :py:class:twitter.error.PythonTwitterDeprecationWarning and will have a version number associated with them such as :py:class:twitter.error.PythonTwitterDeprecationWarning330.
    • :py:class:twitter.models.User now contains a following attribute, which describes whether the authenticated user is following the User. PR #351 <https://github.com/bear/python-twitter/pull/351>_
    • :py:class:twitter.models.DirectMessage contains a full :py:class:twitter.models.User object for both the DirectMessage.sender and DirectMessage.recipient properties. PR #384 <https://github.com/bear/python-twitter/pull/384>_.
    • You can now upload Quicktime movies (*.mov). PR #372 <https://github.com/bear/python-twitter/pull/372>_.
    • If you have a whitelisted app, you can now get the authenticated user's email address through a call to :py:func:twitter.api.Api.VerifyCredentials(). If your app isn't whitelisted, no error is returned. PR #376 <https://github.com/bear/python-twitter/pull/376>_.
    • Google App Engine support has been reintegrated into the library. Check out PR #383 <https://github.com/bear/python-twitter/pull/383>_.
    • video_info is now available on a twitter.models.Media object, which allows access to video urls/bitrates/etc. in the extended_entities node of a tweet.

    What's Changed

    • :py:class:twitter.models.Trend's volume attribute has been renamed tweet_volume in line with Twitter's naming convention. This change should allow users to access the number of tweets being tweeted for a given Trend. PR #375 <https://github.com/bear/python-twitter/pull/375>_
    • :py:class:twitter.ratelimit.RateLimit should behave better now and adds a 1-second padding to requests after sleeping.
    • :py:class:twitter.ratelimit.RateLimit now keeps track of your rate limit status even if you don't have sleep_on_rate_limit set to True when instatiating the API. If you want to add different behavior on hitting a rate limit, you should be able to now by querying the rate limit object. See PR #370 <https://github.com/bear/python-twitter/pull/370>_ for the technical details of the change. There should be no difference in behavior for the defaults, but let us know.

    Bugfixes

    • :py:class:twitter.models.Media again contains a sizes attribute, which was missed back in the Version 3.0 release. PR #360 <https://github.com/bear/python-twitter/pull/360>_
    • The previously bloated :py:func:twitter.api.Api.UploadMediaChunked() function has been broken out into three related functions and fixes two an incompatibility with python 2.7. Behavior remains the same, but this should simplify matters. PR #347 <https://github.com/bear/python-twitter/pull/347>_
    • Fix for :py:func:twitter.api.Api.PostUpdate() where a passing an integer to the media parameter would cause an iteration error to occur. PR #347 <https://github.com/bear/python-twitter/pull/347>_
    • Fix for 401 errors that were occuring in the Streaming Endpoints. PR #364 <https://github.com/bear/python-twitter/pull/364>_
    Open source →
    Additional notes2 sources agree

    Deprecations

    Nothing is being deprecationed this version, however here's what's being deprecated as of v. 3.3.0:

    • twitter.api.Api.UpdateBackgroundImage. Please make sure that your code does not call this function as it will be returning a hard error. There is no replace function. This was deprecated by Twitter around July 2015.

    • twitter.api.Api.PostMedia will be removed. Please use twitter.api.Api.PostUpdate instead.

    • twitter.api.Api.PostMultipleMedia. Please use twitter.api.Api.PostUpdate instead.

    • twitter.api.GetFriends will no longer accept a cursor or count parameter. Please use twitter.api.GetFriendsPaged instead.

    • twitter.api.GetFollowers will no longer accept a cursor or count parameter. Please use twitter.api.GetFollowersPaged instead.

    What's New

    • We've added new deprecation warnings, so it's easier to track when things go away. All of python-twitter's deprecation warnings will be a subclass of twitter.error.PythonTwitterDeprecationWarning and will have a version number associated with them such as twitter.error.PythonTwitterDeprecationWarning330.

    • twitter.models.User now contains a following attribute, which describes whether the authenticated user is following the User. PR #351

    • twitter.models.DirectMessage contains a full twitter.models.User object for both the DirectMessage.sender and DirectMessage.recipient properties. PR #384.

    • You can now upload Quicktime movies (*.mov). PR #372.

    • If you have a whitelisted app, you can now get the authenticated user's email address through a call to twitter.api.Api.VerifyCredentials(). If your app isn't whitelisted, no error is returned. PR #376.

    • Google App Engine support has been reintegrated into the library. Check out PR #383.

    • video_info is now available on a twitter.models.Media object, which allows access to video urls/bitrates/etc. in the extended_entities node of a tweet.

    What's Changed

    • twitter.models.Trend's volume attribute has been renamed tweet_volume in line with Twitter's naming convention. This change should allow users to access the number of tweets being tweeted for a given Trend. PR #375

    • twitter.ratelimit.RateLimit should behave better now and adds a 1-second padding to requests after sleeping.

    • twitter.ratelimit.RateLimit now keeps track of your rate limit status even if you don't have sleep_on_rate_limit set to True when instatiating the API. If you want to add different behavior on hitting a rate limit, you should be able to now by querying the rate limit object. See PR #370 for the technical details of the change. There should be no difference in behavior for the defaults, but let us know.

    Bugfixes

    • twitter.models.Media again contains a sizes attribute, which was missed back in the Version 3.0 release. PR #360

    • The previously bloated twitter.api.Api.UploadMediaChunked() function has been broken out into three related functions and fixes two an incompatibility with python 2.7. Behavior remains the same, but this should simplify matters. PR #347

    • Fix for twitter.api.Api.PostUpdate() where a passing an integer to the media parameter would cause an iteration error to occur. PR #347

    • Fix for 401 errors that were occuring in the Streaming Endpoints. PR #364

    Open source →
  8. 3.126 May 2016
    Release notes

    See what is new and changed in the new docs section \o/ -- https://github.com/bear/python-twitter/blob/master/doc/changelog.rst

    Open source →
    Additional notes2 sources agree

    What's New

    • twitter.api.Api.PostMediaMetadata() Method allows the posting of alt text (hover text) to a photo on Twitter. Note that it appears that you have to call this method prior to attaching the photo to a status.

    • A couple new methods have been added related to showing the connections between two users:

      • twitter.api.Api.ShowFriendship() shows the connection between two users (i.e., are they following each other?)

      • twitter.api.Api.IncomingFriendship() shows all of the authenticated user's pending follower requests (if the user has set their account to private).

      • twitter.api.Api.OutgoingFriendship() shows the authenticated user's request to follow other users (i.e. the user has attempted to follow a private account).

    • Several methods were added related to muting users:

      • twitter.api.Api.GetMutes() returns all users the currently authenticated user is muting (as twitter.models.User objects).

      • twitter.api.Api.GetMutesPaged() returns a page of twitter.models.User objects.

      • twitter.api.Api.GetMutesIDs() returns all of the users the currently authenticated user is muting as integers.

      • twitter.api.Api.GetMutesIDsPaged() returns a single page of the users the currently authenticated user is muting as integers.

    What's Changed

    • twitter.api.Api.GetStatus() Now accepts the keyword argument include_ext_alt_text which will request alt text to be included with the Status object being returned (if available). Defaults to True.

    • [model].__repr__() functions have been revised for better Unicode compatibility. If you notice any weirdness, please let us know.

    • twitter.api.Api() no longer accepts the shortner parameter; however, see examples/shorten_url.py for an example of how to use a URL shortener with the API.

    • twitter.api.Api._Encode() and twitter.api.Api._EncodePostData() have both been refactored out of the API.

    • twitter.models.Media now has an attribute ext_alt_text for alt (hover) text for images posted to Twitter.

    • twitter.models.Status no longer has the properties relative_created_at, now, or Now. If you require a relative time, we suggest using a third-party library.

    • Updated examples, specifically examples/twitter-to-xhtml.py, examples/view_friends.py, examples/shorten_url.py

    • Updated get_access_token.py script to be python3 compatible.

    • twitter.api.Api.GetStreamFilter() now accepts an optional languages parameter as a list.

    Open source →
  9. 3.0rc129 Dec 2015pre-release

    Nothing published for this version

  10. 2.224 Dec 2014

    Nothing published for this version

  11. 2.124 Dec 2014

    Nothing published for this version

  12. 2.011 Jul 2014

    Nothing published for this version

  13. 1.3.118 Feb 2014

    Nothing published for this version

  14. 1.318 Feb 2014

    Nothing published for this version

  15. 1.16 Oct 2013

    Nothing published for this version

  16. 1.05 Jun 2013

    Nothing published for this version

  17. 0.8.73 Mar 2013

    Nothing published for this version

  18. 0.8.610 Feb 2013

    Nothing published for this version

  19. 0.8.58 Feb 2013

    Nothing published for this version

  20. 0.8.217 Apr 2011

    Nothing published for this version

  21. 0.8.1

    Nothing published for this version

  22. 0.514 Sept 2007

    Nothing published for this version

  23. 0.4.110 Sept 2007

    Nothing published for this version

  24. 0.410 Sept 2007

    Nothing published for this version