Python SDK for using SOCO platform
Project description
SOCO-Core Python SDK
Python client to use SOCO answer-as-as-service platform.
Install
pip install soco-core-python
Quick Start
This following example can be found at: quick_start.py. To see more examples, check out /examples folder
First of all, register at https://app.soco.ai. After get your API_KEYs, you can setup a answer answer using 10 lines of code!
from soco_core.soco_client import SOCOClient
from soco_core.examples import load_example_frame_data
QUERY_API_KEY = ENTER_YOUR_QUERY_API_KEY_HERE
ADMIN_API_KEY = ENTER_YOUR_ADMIN_API_KEY_HERE
q_client = SOCOClient(QUERY_API_KEY)
a_client = SOCOClient(ADMIN_API_KEY)
print("## Add some data to the index")
data = load_example_frame_data('mr.sun')
a_client.append_to_index(data)
print("## Wait for indexing is done ... ")
a_client.wait_for_ready(check_frequency=2, timeout=10, verbose=False)
print("## Make a query")
responses = q_client.query("how many images", 10)
SOCOClient.pprint(responses)
Citation
If you use SOCO in research, we would love to be cited:
@misc{soco2019engine,
title={SOCO: Answer Engine Platform},
author={Tiancheng Zhao and Kyusong Lee},
howpublished={\url{https://github.com/ConvMind/soco-core-python}},
year={2019}
}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
soco-core-python-0.1.2.tar.gz
(7.1 kB
view hashes)
Built Distribution
Close
Hashes for soco_core_python-0.1.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a188efcedabe7c20d8d9b95eba7a15af18d83f2a73a8c59c1509cb8bafab1a8a |
|
MD5 | 6836a0d6992f93b55ff9e1729f3bd385 |
|
BLAKE2b-256 | 1966e0dd58364ecedfdfc4f4ad55b397f3b93f403dbdba9990db5eb99f2bfe9b |