METADATA 9.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245
  1. Metadata-Version: 2.1
  2. Name: requests-oauthlib
  3. Version: 1.3.1
  4. Summary: OAuthlib authentication support for Requests.
  5. Home-page: https://github.com/requests/requests-oauthlib
  6. Author: Kenneth Reitz
  7. Author-email: me@kennethreitz.com
  8. License: ISC
  9. Platform: UNKNOWN
  10. Classifier: Development Status :: 5 - Production/Stable
  11. Classifier: Intended Audience :: Developers
  12. Classifier: Natural Language :: English
  13. Classifier: License :: OSI Approved :: BSD License
  14. Classifier: Programming Language :: Python
  15. Classifier: Programming Language :: Python :: 2
  16. Classifier: Programming Language :: Python :: 2.7
  17. Classifier: Programming Language :: Python :: 3
  18. Classifier: Programming Language :: Python :: 3.4
  19. Classifier: Programming Language :: Python :: 3.5
  20. Classifier: Programming Language :: Python :: 3.6
  21. Classifier: Programming Language :: Python :: 3.7
  22. Classifier: Programming Language :: Python :: 3.8
  23. Classifier: Programming Language :: Python :: 3.9
  24. Classifier: Programming Language :: Python :: Implementation :: CPython
  25. Classifier: Programming Language :: Python :: Implementation :: PyPy
  26. Requires-Python: >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*
  27. Description-Content-Type: text/x-rst
  28. License-File: LICENSE
  29. Requires-Dist: oauthlib (>=3.0.0)
  30. Requires-Dist: requests (>=2.0.0)
  31. Provides-Extra: rsa
  32. Requires-Dist: oauthlib[signedtoken] (>=3.0.0) ; extra == 'rsa'
  33. Requests-OAuthlib |build-status| |coverage-status| |docs|
  34. =========================================================
  35. This project provides first-class OAuth library support for `Requests <http://python-requests.org>`_.
  36. The OAuth 1 workflow
  37. --------------------
  38. OAuth 1 can seem overly complicated and it sure has its quirks. Luckily,
  39. requests_oauthlib hides most of these and let you focus at the task at hand.
  40. Accessing protected resources using requests_oauthlib is as simple as:
  41. .. code-block:: pycon
  42. >>> from requests_oauthlib import OAuth1Session
  43. >>> twitter = OAuth1Session('client_key',
  44. client_secret='client_secret',
  45. resource_owner_key='resource_owner_key',
  46. resource_owner_secret='resource_owner_secret')
  47. >>> url = 'https://api.twitter.com/1/account/settings.json'
  48. >>> r = twitter.get(url)
  49. Before accessing resources you will need to obtain a few credentials from your
  50. provider (e.g. Twitter) and authorization from the user for whom you wish to
  51. retrieve resources for. You can read all about this in the full
  52. `OAuth 1 workflow guide on RTD <https://requests-oauthlib.readthedocs.io/en/latest/oauth1_workflow.html>`_.
  53. The OAuth 2 workflow
  54. --------------------
  55. OAuth 2 is generally simpler than OAuth 1 but comes in more flavours. The most
  56. common being the Authorization Code Grant, also known as the WebApplication
  57. flow.
  58. Fetching a protected resource after obtaining an access token can be extremely
  59. simple. However, before accessing resources you will need to obtain a few
  60. credentials from your provider (e.g. Google) and authorization from the user
  61. for whom you wish to retrieve resources for. You can read all about this in the
  62. full `OAuth 2 workflow guide on RTD <https://requests-oauthlib.readthedocs.io/en/latest/oauth2_workflow.html>`_.
  63. Installation
  64. -------------
  65. To install requests and requests_oauthlib you can use pip:
  66. .. code-block:: bash
  67. $ pip install requests requests_oauthlib
  68. .. |build-status| image:: https://github.com/requests/requests-oauthlib/actions/workflows/run-tests.yml/badge.svg
  69. :target: https://github.com/requests/requests-oauthlib/actions
  70. .. |coverage-status| image:: https://img.shields.io/coveralls/requests/requests-oauthlib.svg
  71. :target: https://coveralls.io/r/requests/requests-oauthlib
  72. .. |docs| image:: https://readthedocs.org/projects/requests-oauthlib/badge/
  73. :alt: Documentation Status
  74. :scale: 100%
  75. :target: https://requests-oauthlib.readthedocs.io/
  76. History
  77. -------
  78. v1.3.1 (21 January 2022)
  79. ++++++++++++++++++++++++
  80. - Add initial support for OAuth Mutual TLS (draft-ietf-oauth-mtls)
  81. - Add eBay compliance fix
  82. - Add Spotify OAuth 2 Tutorial
  83. - Add support for python 3.8, 3.9
  84. - Fixed LinkedIn Compliance Fixes
  85. - Fixed ReadTheDocs Documentation and sphinx errors
  86. - Moved pipeline to GitHub Actions
  87. v1.3.0 (6 November 2019)
  88. ++++++++++++++++++++++++
  89. - Instagram compliance fix
  90. - Added ``force_querystring`` argument to fetch_token() method on OAuth2Session
  91. v1.2.0 (14 January 2019)
  92. ++++++++++++++++++++++++
  93. - This project now depends on OAuthlib 3.0.0 and above. It does **not** support
  94. versions of OAuthlib before 3.0.0.
  95. - Updated oauth2 tests to use 'sess' for an OAuth2Session instance instead of `auth`
  96. because OAuth2Session objects and methods acceept an `auth` paramether which is
  97. typically an instance of `requests.auth.HTTPBasicAuth`
  98. - `OAuth2Session.fetch_token` previously tried to guess how and where to provide
  99. "client" and "user" credentials incorrectly. This was incompatible with some
  100. OAuth servers and incompatible with breaking changes in oauthlib that seek to
  101. correctly provide the `client_id`. The older implementation also did not raise
  102. the correct exceptions when username and password are not present on Legacy
  103. clients.
  104. - Avoid automatic netrc authentication for OAuth2Session.
  105. v1.1.0 (9 January 2019)
  106. +++++++++++++++++++++++
  107. - Adjusted version specifier for ``oauthlib`` dependency: this project is
  108. not yet compatible with ``oauthlib`` 3.0.0.
  109. - Dropped dependency on ``nose``.
  110. - Minor changes to clean up the code and make it more readable/maintainable.
  111. v1.0.0 (4 June 2018)
  112. ++++++++++++++++++++
  113. - **Removed support for Python 2.6 and Python 3.3.**
  114. This project now supports Python 2.7, and Python 3.4 and above.
  115. - Added several examples to the documentation.
  116. - Added plentymarkets compliance fix.
  117. - Added a ``token`` property to OAuth1Session, to match the corresponding
  118. ``token`` property on OAuth2Session.
  119. v0.8.0 (14 February 2017)
  120. +++++++++++++++++++++++++
  121. - Added Fitbit compliance fix.
  122. - Fixed an issue where newlines in the response body for the access token
  123. request would cause errors when trying to extract the token.
  124. - Fixed an issue introduced in v0.7.0 where users passing ``auth`` to several
  125. methods would encounter conflicts with the ``client_id`` and
  126. ``client_secret``-derived auth. The user-supplied ``auth`` argument is now
  127. used in preference to those options.
  128. v0.7.0 (22 September 2016)
  129. ++++++++++++++++++++++++++
  130. - Allowed ``OAuth2Session.request`` to take the ``client_id`` and
  131. ``client_secret`` parameters for the purposes of automatic token refresh,
  132. which may need them.
  133. v0.6.2 (12 July 2016)
  134. +++++++++++++++++++++
  135. - Use ``client_id`` and ``client_secret`` for the Authorization header if
  136. provided.
  137. - Allow explicit bypass of the Authorization header by setting ``auth=False``.
  138. - Pass through the ``proxies`` kwarg when refreshing tokens.
  139. - Miscellaneous cleanups.
  140. v0.6.1 (19 February 2016)
  141. +++++++++++++++++++++++++
  142. - Fixed a bug when sending authorization in headers with no username and
  143. password present.
  144. - Make sure we clear the session token before obtaining a new one.
  145. - Some improvements to the Slack compliance fix.
  146. - Avoid timing problems around token refresh.
  147. - Allow passing arbitrary arguments to requests when calling
  148. ``fetch_request_token`` and ``fetch_access_token``.
  149. v0.6.0 (14 December 2015)
  150. +++++++++++++++++++++++++
  151. - Add compliance fix for Slack.
  152. - Add compliance fix for Mailchimp.
  153. - ``TokenRequestDenied`` exceptions now carry the entire response, not just the
  154. status code.
  155. - Pass through keyword arguments when refreshing tokens automatically.
  156. - Send authorization in headers, not just body, to maximize compatibility.
  157. - More getters/setters available for OAuth2 session client values.
  158. - Allow sending custom headers when refreshing tokens, and set some defaults.
  159. v0.5.0 (4 May 2015)
  160. +++++++++++++++++++
  161. - Fix ``TypeError`` being raised instead of ``TokenMissing`` error.
  162. - Raise requests exceptions on 4XX and 5XX responses in the OAuth2 flow.
  163. - Avoid ``AttributeError`` when initializing the ``OAuth2Session`` class
  164. without complete client information.
  165. v0.4.2 (16 October 2014)
  166. ++++++++++++++++++++++++
  167. - New ``authorized`` property on OAuth1Session and OAuth2Session, which allows
  168. you to easily determine if the session is already authorized with OAuth tokens
  169. or not.
  170. - New ``TokenMissing`` and ``VerifierMissing`` exception classes for OAuth1Session:
  171. this will make it easier to catch and identify these exceptions.
  172. v0.4.1 (6 June 2014)
  173. ++++++++++++++++++++
  174. - New install target ``[rsa]`` for people using OAuth1 RSA-SHA1 signature
  175. method.
  176. - Fixed bug in OAuth2 where supplied state param was not used in auth url.
  177. - OAuth2 HTTPS checking can be disabled by setting environment variable
  178. ``OAUTHLIB_INSECURE_TRANSPORT``.
  179. - OAuth1 now re-authorize upon redirects.
  180. - OAuth1 token fetching now raise a detailed error message when the
  181. response body is incorrectly encoded or the request was denied.
  182. - Added support for custom OAuth1 clients.
  183. - OAuth2 compliance fix for Sina Weibo.
  184. - Multiple fixes to facebook compliance fix.
  185. - Compliance fixes now re-encode body properly as bytes in Python 3.
  186. - Logging now properly done under ``requests_oauthlib`` namespace instead
  187. of piggybacking on oauthlib namespace.
  188. - Logging introduced for OAuth1 auth and session.
  189. v0.4.0 (29 September 2013)
  190. ++++++++++++++++++++++++++
  191. - OAuth1Session methods only return unicode strings. #55.
  192. - Renamed requests_oauthlib.core to requests_oauthlib.oauth1_auth for consistency. #79.
  193. - Added Facebook compliance fix and access_token_response hook to OAuth2Session. #63.
  194. - Added LinkedIn compliance fix.
  195. - Added refresh_token_response compliance hook, invoked before parsing the refresh token.
  196. - Correctly limit compliance hooks to running only once!
  197. - Content type guessing should only be done when no content type is given
  198. - OAuth1 now updates r.headers instead of replacing it with non case insensitive dict
  199. - Remove last use of Response.content (in OAuth1Session). #44.
  200. - State param can now be supplied in OAuth2Session.authorize_url