Skip to main content

XINA API Libraries

We aim to provide a variety of reference XINA API client implementations for different programming languages and environments.

Python

xina_api_python_0.4.0.zip

Installation

Prerequisites

  • Python 3.8 or greater

The xina client communicates with XINA via the XINA Tunnel utility. You must have it running for the xina client to connect.

Steps

  1. Extract the zip file.
  2. Open a terminal in the root extracted directory, and execute the following commands:
    python3 -m pip install .
    

Examples

Client class

from xina import XPClient

with XPClient() as x:
    res = x.act({'action': 'version'})

print(res)
# => {'schema':100, 'host':'sandbox.xina.io', 'server':'9.1.4', 'team':100}

CLI

python -m xina action '{"action":"version"}'
# => {"schema":100,"host":"sandbox.xina.io","server":"9.1.4","team":100}