# karix-python
# Overview
Karix API lets you interact with the Karix platform (karix.io). It allows you to query your account, set up webhooks, send messages and buy phone numbers.

This Python package is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:

- API version: 1.0
- Package version: 1.0.1
- Build package: io.swagger.codegen.languages.PythonClientCodegen

## Requirements.

Python 2.7 and 3.4+

## Installation & Usage
### pip install

If the python package is hosted on Github, you can install directly from Github

```sh
pip install git+https://github.com/karixtech/karix-python.git
```
(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/karixtech/karix-python.git`)

Then import the package:
```python
import karix 
```

### Setuptools

Install via [Setuptools](http://pypi.python.org/pypi/setuptools).

```sh
python setup.py install --user
```
(or `sudo python setup.py install` to install the package for all users)

Then import the package:
```python
import karix
```

## Getting Started

Please follow the [installation procedure](#installation--usage) and then run the following:

```python
from __future__ import print_function
import time
import karix
from karix.rest import ApiException
from karix.configuration import Configuration
from karix.api_client import ApiClient
from pprint import pprint

# Configure HTTP basic authorization: basicAuth
config = Configuration()
config.username = 'YOUR_AUTH_ID'
config.password = 'YOUR_AUTH_TOKEN'
# create an instance of the API class
api_instance = karix.MessageApi(api_client=ApiClient(configuration=config))
message = karix.CreateMessage(source="<source>", destination=["<destination>"], text="Sent from python SDK")

try:
    api_response = api_instance.send_message(message=message)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling MessageApi->send_message: %s\n" % e)
```
