<commit_before>#Simple Mailjet APIv3 wrapper

[doc]: http://dev.mailjet.com/guides/?python#
[api_doc]: https://github.com/mailjet/api-documentation

[![Build Status](https://travis-ci.org/mailjet/mailjet-apiv3-python.svg?branch=master)](https://travis-ci.org/mailjet/mailjet-apiv3-python)

### API documentation

Every code examples can be find on the [Mailjet Documentation][doc]

(Please refer to the [Mailjet Documentation Repository][api_doc] to contribute to the documentation examples)

## Installation

``` bash
(sudo) pip install mailjet_rest
```

## Getting Started

First, make sure you have an API key, and an API secret.
Once you got them, save them in your environment:

```
export MJ_APIKEY_PUBLIC='your api key'
export MJ_APIKEY_PRIVATE='your api secret'
```

``` python
# import the mailjet wrapper
from mailjet_rest import Client
import os

# Get your environment Mailjet keys
API_KEY = os.environ['MJ_APIKEY_PUBLIC']
API_SECRET = os.environ['MJ_APIKEY_PRIVATE']

mailjet = Client(auth=(API_KEY, API_SECRET))

```

## Make a `GET` request:
``` python
# get every contacts
result = mailjet.contact.get()
```

## `GET` request with filters:
``` python
# get the 2 first contacts
result = mailjet.contact.get(filters={'limit': 2})
```
## `POST` request
``` python
# Register a new sender email address
result = mailjet.sender.create(data={'email': '<EMAIL>'})
```
<commit_msg>Add Readme explanation<commit_after>#Simple Mailjet APIv3 wrapper

[doc]: http://dev.mailjet.com/guides/?python#
[api_doc]: https://github.com/mailjet/api-documentation

[![Build Status](https://travis-ci.org/mailjet/mailjet-apiv3-python.svg?branch=master)](https://travis-ci.org/mailjet/mailjet-apiv3-python)

### API documentation

Every code examples can be find on the [Mailjet Documentation][doc]

(Please refer to the [Mailjet Documentation Repository][api_doc] to contribute to the documentation examples)

## Installation

``` bash
(sudo) pip install mailjet_rest
```

## Getting Started

First, make sure you have an API key, and an API secret.
Once you got them, save them in your environment:

```
export MJ_APIKEY_PUBLIC='your api key'
export MJ_APIKEY_PRIVATE='your api secret'
```

``` python
# import the mailjet wrapper
from mailjet_rest import Client
import os

# Get your environment Mailjet keys
API_KEY = os.environ['MJ_APIKEY_PUBLIC']
API_SECRET = os.environ['MJ_APIKEY_PRIVATE']

mailjet = Client(auth=(API_KEY, API_SECRET), version='v3/')

```

**NOTE**: `version` reflects the api version in the url (`https://api.mailjet.com/{{ version }}/REST/`). It is `'v3/'` by default and can be used to select another api version (for example `v3.1/` for the new send API). **The forward slash in the value is mandatory!**

## Make a `GET` request:
``` python
# get every contacts
result = mailjet.contact.get()
```

## `GET` request with filters:
``` python
# get the 2 first contacts
result = mailjet.contact.get(filters={'limit': 2})
```
## `POST` request
``` python
# Register a new sender email address
result = mailjet.sender.create(data={'email': '<EMAIL>'})
```

{'fraction_non_alphanumeric': 0.13923227065712426, 'fraction_numerical': 0.004554326610279766, 'mean_word_length': 5.327160493827161, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 7, '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': '582303', 'n_tokens_mistral': 1027, 'n_tokens_neox': 992, 'n_words': 305}