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

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}

Revision #6
Created 20 October 2023 19:06:33 by Nick Dobson
Updated 28 May 2024 13:27:44 by Bradley Tse