Python client for Karix API
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.swagger-codegen
docs
karix
test
.gitignore
.swagger-codegen-ignore
.travis.yml
LICENSE
README.md
git_push.sh
requirements.txt
setup.py
test-requirements.txt
tox.ini

README.md

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 project:

  • API version: 1.0
  • Package version: 1.0.0
  • 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

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:

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_USERNAME'
config.password = 'YOUR_PASSWORD'
# 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)