index.rst 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  1. oauth2client
  2. ============
  3. .. note:: oauth2client is now deprecated. No more features will be added to the
  4. libraries and the core team is turning down support. We recommend you use
  5. `google-auth`_ and `oauthlib`_. For more details on the deprecation, see `oauth2client deprecation`_.
  6. .. _google-auth: https://google-auth.readthedocs.io
  7. .. _oauthlib: http://oauthlib.readthedocs.io/
  8. .. _oauth2client deprecation: https://google-auth.readthedocs.io/en/latest/oauth2client-deprecation.html
  9. *making OAuth2 just a little less painful*
  10. ``oauth2client`` makes it easy to interact with OAuth2-protected resources,
  11. especially those related to Google APIs. You can also start with `general
  12. information about using OAuth2 with Google APIs
  13. <https://developers.google.com/accounts/docs/OAuth2>`_.
  14. Getting started
  15. ---------------
  16. We recommend installing via ``pip``:
  17. .. code-block:: bash
  18. $ pip install --upgrade oauth2client
  19. You can also install from source:
  20. .. code-block:: bash
  21. $ git clone https://github.com/google/oauth2client
  22. $ cd oauth2client
  23. $ python setup.py install
  24. Using ``pypy``
  25. --------------
  26. - In order to use crypto libraries (e.g. for service accounts) you will
  27. need to install one of ``pycrypto`` or ``pyOpenSSL``.
  28. - Using ``pycrypto`` with ``pypy`` will be in general problematic. If
  29. ``libgmp`` is installed on your machine, the ``pycrypto`` install will
  30. attempt to build ``_fastmath.c``. However, this file uses CPython
  31. implementation details and hence can't be built in ``pypy`` (as of
  32. ``pypy`` 2.6 and ``pycrypto`` 2.6.1). In order to install
  33. .. code-block:: bash
  34. with_gmp=no pip install --upgrade pycrypto
  35. See discussions on the `pypy issue tracker`_ and the
  36. `pycrypto issue tracker`_.
  37. - Using ``pyOpenSSL`` with versions of ``pypy`` before 2.6 may be in general
  38. problematic since ``pyOpenSSL`` depends on the ``cryptography`` library.
  39. For versions of ``cryptography`` before 1.0, importing ``pyOpenSSL``
  40. with it caused `massive startup costs`_. In order to address this
  41. slow startup, ``cryptography`` 1.0 made some `changes`_ in how it used
  42. ``cffi`` when means it can't be used on versions of ``pypy`` before 2.6.
  43. The default version of ``pypy`` you get when installed
  44. .. code-block:: bash
  45. apt-get install pypy pypy-dev
  46. on `Ubuntu 14.04`_ is 2.2.1. In order to upgrade, you'll need to use
  47. the `pypy/ppa PPA`_:
  48. .. code-block:: bash
  49. apt-get purge pypy pypy-dev
  50. add-apt-repository ppa:pypy/ppa
  51. apt-get update
  52. apt-get install pypy pypy-dev
  53. .. _pypy issue tracker: https://bitbucket.org/pypy/pypy/issues/997
  54. .. _pycrypto issue tracker: https://github.com/dlitz/pycrypto/pull/59
  55. .. _massive startup costs: https://github.com/pyca/pyopenssl/issues/137
  56. .. _changes: https://github.com/pyca/cryptography/issues/2275#issuecomment-130751514
  57. .. _Ubuntu 14.04: http://packages.ubuntu.com/trusty/pypy
  58. .. _pypy/ppa PPA: https://launchpad.net/~pypy/+archive/ubuntu/ppa
  59. Downloads
  60. ^^^^^^^^^
  61. * `Most recent release tarball
  62. <https://github.com/google/oauth2client/tarball/master>`_
  63. * `Most recent release zipfile
  64. <https://github.com/google/oauth2client/zipball/master>`_
  65. * `Complete release list <https://github.com/google/oauth2client/releases>`_
  66. Library Documentation
  67. ---------------------
  68. * Complete library index: :ref:`genindex`
  69. * Index of all modules: :ref:`modindex`
  70. * Search all documentation: :ref:`search`
  71. Contributing
  72. ------------
  73. Please see the `contributing page`_ for more information.
  74. In particular, we love pull requests -- but please make sure to sign the
  75. contributor license agreement.
  76. .. _contributing page: https://github.com/google/oauth2client/blob/master/CONTRIBUTING.md
  77. .. toctree::
  78. :maxdepth: 1
  79. :hidden:
  80. source/oauth2client
  81. Supported Python Versions
  82. -------------------------
  83. We support Python 2.7 and 3.4+. (Whatever this file says, the truth is
  84. always represented by our `tox.ini`_).
  85. .. _tox.ini: https://github.com/google/oauth2client/blob/master/tox.ini
  86. We explicitly decided to support Python 3 beginning with version
  87. 3.4. Reasons for this include:
  88. * Encouraging use of newest versions of Python 3
  89. * Following the lead of prominent `open-source projects`_
  90. * Unicode literal support which
  91. allows for a cleaner codebase that works in both Python 2 and Python 3
  92. * Prominent projects like `django`_ have `dropped support`_ for earlier
  93. versions (3.3 support dropped in December 2015, and 2.6 support
  94. `dropped`_ in September 2014)
  95. .. _open-source projects: http://docs.python-requests.org/en/latest/
  96. .. _Unicode literal support: https://www.python.org/dev/peps/pep-0414/
  97. .. _django: https://docs.djangoproject.com/
  98. .. _dropped support: https://docs.djangoproject.com/en/1.9/faq/install/#what-python-version-can-i-use-with-django
  99. .. _dropped: https://docs.djangoproject.com/en/1.7/faq/install/#what-python-version-can-i-use-with-django