<commit_before># EveryoneAPI.py v0.1.2

[![Source](https://img.shields.io/badge/source-cedwardsmedia/everyoneapi.py-blue.svg?style=flat-square "Source")](https://www.github.com/cedwardsmedia/everyoneapi.py)
[![Version](https://img.shields.io/badge/version-0.1.2s-brightgreen.svg?style=flat-square)]()
[![License](https://img.shields.io/badge/license-BSD-lightgrey.svg?style=flat-square "License")](./LICENSE.md)
[![Gratipay](https://img.shields.io/gratipay/cedwardsmedia.svg?style=flat-square "License")](https://gratipay.com/~cedwardsmedia/)
[![Say Thanks!](https://img.shields.io/badge/Say%20Thanks-!-1EAEDB.svg)](https://saythanks.io/to/cedwardsmedia)

_EveryoneAPI.py_ is a Python 3 module for querying EveryoneAPI. It is based on [EveryonePHP](https://github.com/cedwardsmedia/everyonephp) and was written to provide a Python class for EveryoneAPI as well as a Python learning project for myself.

In order to use _EveryoneAPI.py_, you must have an [EveryoneAPI account](https://www.everyoneapi.com/sign-up)  with [available funds](https://www.everyoneapi.com/pricing).


## Usage

I have never been a great programmer. As such, I strived to make EveryoneAPI.py as simple to use as possible and I'm always looking to simplify it even more. Let's build a basic EveryoneAPI client using EveryoneAPI.py:

### Step 1: Install [Python Requests](http://docs.python-requests.org)
```bash
$ pip install requests
```
Install Python Requests using [pip](http://docs.python-guide.org/en/latest/starting/installation/)

### Step 2: Import the EveryoneAPI module and instantiate the object
```python3
# Import EveryoneAPI
import everyoneapi
```

# Instantiate EveryoneAPI
api = everyoneapi.EveryoneAPI()
```
Creating a new EveryoneAPI.py object allows us to interact with the class.

### Step 3: Set EveryoneAPI Credentials
```python3
# Set EveryoneAPI Credentials
api.sid = "9e3cef42da225d42bd86feaa80ff47";
api.token = "<PASSWORD>";
```
EveryoneAPI.py needs these credentials in order to query EveryoneAPI. Otherwise, the query will fail. How you obtain and store these credentials is completely up to you, just be sure to set them for each instance of EveryoneAPI.py before calling `query()`.

### Step 4: Set EveryoneAPI Data Points
```python3
// Set EveryoneAPI Data Points
api.datapoints = ["name", "profile", "cnam", "gender", "image", "address", "location", "line_provider", "carrier", "carrier_o", "linetype"]
```
Each data point is optional and all data points are returned by default, unless otherwise specified. In the same way EveryoneAPI uses a comma separated list of identifiers, EveryoneAPI.py uses a simple list to specify the data points you wish to retrieve. EveryoneAPI.py passes these identifiers directly to EveryoneAPI so you will use the same identifiers here as you would in a cURL request.<commit_msg>Corrected README instructions for using pip3<commit_after># EveryoneAPI.py v0.1.2

[![Source](https://img.shields.io/badge/source-cedwardsmedia/everyoneapi.py-blue.svg?style=flat-square "Source")](https://www.github.com/cedwardsmedia/everyoneapi.py)
[![Version](https://img.shields.io/badge/version-0.1.2s-brightgreen.svg?style=flat-square)]()
[![License](https://img.shields.io/badge/license-BSD-lightgrey.svg?style=flat-square "License")](./LICENSE.md)
[![Gratipay](https://img.shields.io/gratipay/cedwardsmedia.svg?style=flat-square "License")](https://gratipay.com/~cedwardsmedia/)
[![Say Thanks!](https://img.shields.io/badge/Say%20Thanks-!-1EAEDB.svg)](https://saythanks.io/to/cedwardsmedia)

_EveryoneAPI.py_ is a Python 3 module for querying EveryoneAPI. It is based on [EveryonePHP](https://github.com/cedwardsmedia/everyonephp) and was written to provide a Python class for EveryoneAPI as well as a Python learning project for myself.

In order to use _EveryoneAPI.py_, you must have an [EveryoneAPI account](https://www.everyoneapi.com/sign-up)  with [available funds](https://www.everyoneapi.com/pricing).


## Usage

I have never been a great programmer. As such, I strived to make EveryoneAPI.py as simple to use as possible and I'm always looking to simplify it even more. Let's build a basic EveryoneAPI client using EveryoneAPI.py:

### Step 1: Install [Python Requests](http://docs.python-requests.org)
```bash
$ pip3 install requests
```
Install Python Requests using [pip](http://docs.python-guide.org/en/latest/starting/installation/)

### Step 2: Import the EveryoneAPI module and instantiate the object
```python3
# Import EveryoneAPI
import everyoneapi
```

# Instantiate EveryoneAPI
api = everyoneapi.EveryoneAPI()
```
Creating a new EveryoneAPI.py object allows us to interact with the class.

### Step 3: Set EveryoneAPI Credentials
```python3
# Set EveryoneAPI Credentials
api.sid = "9e3cef42da225d42bd86feaa80ff47";
api.token = "65f3<PASSWORD>2c62<PASSWORD>2<PASSWORD>";
```
EveryoneAPI.py needs these credentials in order to query EveryoneAPI. Otherwise, the query will fail. How you obtain and store these credentials is completely up to you, just be sure to set them for each instance of EveryoneAPI.py before calling `query()`.

### Step 4: Set EveryoneAPI Data Points
```python3
// Set EveryoneAPI Data Points
api.datapoints = ["name", "profile", "cnam", "gender", "image", "address", "location", "line_provider", "carrier", "carrier_o", "linetype"]
```
Each data point is optional and all data points are returned by default, unless otherwise specified. In the same way EveryoneAPI uses a comma separated list of identifiers, EveryoneAPI.py uses a simple list to specify the data points you wish to retrieve. EveryoneAPI.py passes these identifiers directly to EveryoneAPI so you will use the same identifiers here as you would in a cURL request.
{'fraction_non_alphanumeric': 0.12068058235397298, 'fraction_numerical': 0.012804771092790738, 'mean_word_length': 5.378076062639821, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 22, 'lorem ipsum': 0, 'www.': 6, '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': '2384603', 'n_tokens_mistral': 1786, 'n_tokens_neox': 1650, 'n_words': 568}