karix

Python helper for karix.io


Keywords
sms, karix
License
MIT
Install
pip install karix==1.0.1

Documentation

karix-python

Overview

Karix API lets you interact with the Karix platform using an omnichannel messaging API. It also allows you to query your account, set up webhooks and buy phone numbers.

This Python package is automatically generated by the Swagger Codegen project:

  • API version: 2.0
  • Package version: 2.0.0
  • Build package: io.swagger.codegen.languages.PythonClientCodegen

Requirements.

Python 2.7 and 3.4+

Installation & Usage

pip install

pip install "karix<3.0.0"

(you may need to run pip with root permission: sudo pip install "karix<3.0.0")

Then import the package:

import karix 

Setuptools

Install via Setuptools.

python setup.py install --user

(or sudo python setup.py install to install the package for all users)

Then import the package:

import karix

Getting Started

Please follow the installation procedure and then run the following:

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(
    channel="sms", source="<source>", destination=["<destination>"],
    content={"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)