<commit_before>[![Build Status](https://travis-ci.org/joestump/python-oauth2.svg)](https://travis-ci.org/joestump/python-oauth2)

# Overview

This code was originally forked from [<NAME> and <NAME>'s oauth.py code](http://github.com/leah/python-oauth/). Some of the tests come from a [fork by Vic Fryzel](http://github.com/shellsage/python-oauth), while a revamped Request class and more tests were merged in from [Mark Paschal's fork](http://github.com/markpasc/python-oauth). A number of notable differences exist between this code and its forefathers:

* 100% unit test coverage.
* The <code>DataStore</code> object has been completely ripped out. While creating unit tests for the library I found several substantial bugs with the implementation and confirmed with <NAME> that it was never fully baked.
* Classes are no longer prefixed with <code>OAuth</code>.
* The <code>Request</code> class now extends from <code>dict</code>.
* The library is likely no longer compatible with Python 2.3.
* The <code>Client</code> class works and extends from <code>httplib2</code>. It's a thin wrapper that handles automatically signing any normal HTTP request you might wish to make.

# Signing a Request

```python
import oauth2 as oauth
import time
<commit_msg>Added notes on how to install and a link to the PIP package.<commit_after>[![Build Status](https://travis-ci.org/joestump/python-oauth2.svg)](https://travis-ci.org/joestump/python-oauth2)

# Overview

This code was originally forked from [<NAME> and <NAME>'s oauth.py code](http://github.com/leah/python-oauth/). Some of the tests come from a [fork by <NAME>](http://github.com/shellsage/python-oauth), while a revamped Request class and more tests were merged in from [Mark Paschal's fork](http://github.com/markpasc/python-oauth). A number of notable differences exist between this code and its forefathers:

* 100% unit test coverage.
* The <code>DataStore</code> object has been completely ripped out. While creating unit tests for the library I found several substantial bugs with the implementation and confirmed with <NAME> that it was never fully baked.
* Classes are no longer prefixed with <code>OAuth</code>.
* The <code>Request</code> class now extends from <code>dict</code>.
* The library is likely no longer compatible with Python 2.3.
* The <code>Client</code> class works and extends from <code>httplib2</code>. It's a thin wrapper that handles automatically signing any normal HTTP request you might wish to make.

# Installing

You can install `oauth2` via [the PIP package](https://pypi.python.org/pypi/oauth2). 

    $ pip install oauth2
    
We recommend using [virtualenv](https://virtualenv.pypa.io/en/latest/).

# Signing a Request

```python
import oauth2 as oauth
import time

{'fraction_non_alphanumeric': 0.10438564697354114, 'fraction_numerical': 0.007611453425154041, 'mean_word_length': 4.690721649484536, 'pattern_counts': {'":': 0, '<': 34, '<?xml version=': 0, '>': 34, 'https://': 6, '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': '5052725', 'n_tokens_mistral': 817, 'n_tokens_neox': 783, 'n_words': 323}