XINA API Libraries
We aim to provide a variety of reference XINA API client implementations for different programming languages and environments.
Python
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
- Extract the zip file.
- Open a terminal in the root extracted directory, and execute the following
commands:
python3 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}