<commit_before>Coinbase
========

.. image:: https://img.shields.io/pypi/v/coinbase.svg
    :target: https://pypi.python.org/pypi/coinbase

.. image:: https://img.shields.io/travis/coinbase/coinbase-python/master.svg
    :target: https://travis-ci.org/coinbase/coinbase-python

.. image:: https://img.shields.io/pypi/wheel/coinbase.svg
    :target: https://pypi.python.org/pypi/coinbase/

.. image:: https://img.shields.io/pypi/pyversions/coinbase.svg
    :target: https://pypi.python.org/pypi/coinbase/

.. image:: https://img.shields.io/pypi/l/coinbase.svg
    :target: https://pypi.python.org/pypi/coinbase/

The official Python library for the `Coinbase API V2 <https://developers.coinbase.com/api/v2>`_.

*Important*: this library currently targets the API V2, and the OAuth client requires V2 permissions (i.e. ``wallet:accounts:read``).
If you're still using the API V1, please use `the old version of this library <https://pypi.python.org/pypi/coinbase/1.0.4>`_.

Features
--------

- Near-100% test coverage.
- Support for both `API Key + Secret <https://developers.coinbase.com/api/v2/#api-key>`_ and `OAuth 2 <https://developers.coinbase.com/api/v2/#oauth2-coinbase-connect>`_ authentication.
- Convenient methods for making calls to the API - packs JSON for you!
- Automatic parsing of API responses into relevant Python objects.
- All objects have tab-completable methods and attributes when using `IPython <http://ipython.org>`_.


Installation
------------

``coinbase`` is available on `PYPI <https://pypi.python.org/pypi/coinbase/>`_.
Install with ``pip``:

.. code:: bash

    pip install coinbase

or with ``easy_install``:

.. code:: bash

    easy_install coinbase

The library is currently tested against Python versions 2.7 and 3.4+.

Documentation
-------------

The first thing you'll need to do is `sign up with Coinbase <https://coinbase.com>`_.

API Key + Secret
^^^^^^^^^^^^^^^^

If you're writing code for your own Coinbase account, `enable an API key <https://coinbase.com/settings/api>`_.

Next, create a ``Client`` object for interacting with the API:

.. code:: python

    from coinbase.wallet.client import Client
    client = Client(api_key, api_secret)

OAuth2<commit_msg>Add attribution for <NAME>'s original package<commit_after>Coinbase
========

.. image:: https://img.shields.io/pypi/v/coinbase.svg
    :target: https://pypi.python.org/pypi/coinbase

.. image:: https://img.shields.io/travis/coinbase/coinbase-python/master.svg
    :target: https://travis-ci.org/coinbase/coinbase-python

.. image:: https://img.shields.io/pypi/wheel/coinbase.svg
    :target: https://pypi.python.org/pypi/coinbase/

.. image:: https://img.shields.io/pypi/pyversions/coinbase.svg
    :target: https://pypi.python.org/pypi/coinbase/

.. image:: https://img.shields.io/pypi/l/coinbase.svg
    :target: https://pypi.python.org/pypi/coinbase/

The official Python library for the `Coinbase API V2 <https://developers.coinbase.com/api/v2>`_.

*Important*: this library currently targets the API V2, and the OAuth client requires V2 permissions (i.e. ``wallet:accounts:read``).
If you're still using the API V1, please use `the old version of this library <https://pypi.python.org/pypi/coinbase/1.0.4>`_.

Features
--------

- Near-100% test coverage.
- Support for both `API Key + Secret <https://developers.coinbase.com/api/v2/#api-key>`_ and `OAuth 2 <https://developers.coinbase.com/api/v2/#oauth2-coinbase-connect>`_ authentication.
- Convenient methods for making calls to the API - packs JSON for you!
- Automatic parsing of API responses into relevant Python objects.
- All objects have tab-completable methods and attributes when using `IPython <http://ipython.org>`_.


Installation
------------

``coinbase`` is available on `PYPI <https://pypi.python.org/pypi/coinbase/>`_.
Install with ``pip``:

.. code:: bash

    pip install coinbase

or with ``easy_install``:

.. code:: bash

    easy_install coinbase

The library is currently tested against Python versions 2.7 and 3.4+.

*Note*: this package name used to refer to the unofficial `coinbase_python`
library maintained by [<NAME>](http://onepercentbreadsticks.com/).
George graciously allowed us to use the name for this package instead. You can
still find that package [on Github](https://github.com/sibblegp/coinbase_python).
Thanks, George.

Documentation
-------------

The first thing you'll need to do is `sign up with Coinbase <https://coinbase.com>`_.

API Key + Secret
^^^^^^^^^^^^^^^^

If you're writing code for your own Coinbase account, `enable an API key <https://coinbase.com/settings/api>`_.

Next, create a ``Client`` object for interacting with the API:

.. code:: python

    from coinbase.wallet.client import Client
    client = Client(api_key, api_secret)

OAuth2
{'fraction_non_alphanumeric': 0.15420071234024724, 'fraction_numerical': 0.008380473496752567, 'mean_word_length': 3.703448275862069, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 21, 'https://': 35, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3451739', 'n_tokens_mistral': 1621, 'n_tokens_neox': 1518, 'n_words': 433}