No description, website, or topics provided.
Switch branches/tags
Nothing to show
Clone or download
Latest commit 070439e Jan 20, 2017
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
README.md readme format Dec 30, 2016
tupu_api.py suport python3 Jan 20, 2017

README.md

TUPU Python SDK

SDK for TUPU visual recognition service

https://www.tuputech.com

Install Dependencies

sudo pip install rsa requests base64 json

Interface

tupu_client = TUPU(secret_id, private_key_path, url)

Parameters

Example

from tupu_api import TUPU
tupu = TUPU(secret_id='xxxxxxxxxxxxxxxxxx',
                    private_key_path='./rsa_private_key.pem')
# url
images = ["http://example.com/001.jpg", "http://example.com/002.jpg"]
result = tupu.api(images=images, is_url=True)
# image file
images = ["/home/user/001.jpg", "/home/user/002.jpg"]
result = tupu.api(images=images, is_url=False)
# zip file
images = ["/home/user/001.zip", "/home/user/002.zip"]
result = tupu.api(images=images, is_url=False)

print result["verify_result"]