Getting Started

Click here to download this page as a Jupyter Notebook.


From PyPi:

pip install kxy

From GitHub:

git clone & cd ./kxy-python & pip install .

The kxy package only supports Python 3. Replace pip by pip3 in the commands above, as needed.


All heavy-duty computations, including but not limited to solving any maximum-entropy optimization problem, are run on our serverless infrastructure and require an API key. The API key is set by running the command

kxy configure

as a one-off, and following the instructions.

To request a demo and get a trial API key, email

Working with Pandas DataFrames

The most convenient way of using the kxy package is through pandas DataFrame objects. All our analyses are available as methods of pandas DataFrame objects, under the kxy accessor (i.e. as df.kxy.<method_name>). To access these, all you need is to import the kxy package alongside pandas.

In [1]:
import pandas as pd
import kxy

Checkout the Examples section for tutorials with code snippets.

Working with Numpy Arrays

If you prefer working with numpy arrays, you might want to familiarize yourself with methods in the lower level namespaces

and/or the higher level namespaces

depending on your usecase.

Working with the Low Level RESTFul API

To directly access our serverless compute infrastructure through its RESTFul API take a look at kxy.api.client.APIClient.