Using PIP Python Package

iApp Technology just released a PIP Python Package on Power Meter OCR.

For easing the python development using iApp AI API service, we have released the iapp_ai python pip package. It is the api client library for iApp AI API service for python.

Installation

$ pip install iapp_ai

Note: It can be either pip or pip3 depend on your environment.

Calling Power Meter API

# Power Meter OCR API required a base64 image in text file path (Only image string)
api.power_meter(headers={'Content-Type': 'application/json'}, image="iapp_ai/media/base64.txt").json()

Example Usages

import iapp_ai


# You can request API key at https://ai.iapp.co.th
apikey = 'XXXXX_Your_API_Key_XXXXX' 

api = iapp_ai.api(apikey)

# Power Meter OCR API required a base64 image in text file path (Only image string)
result = api.power_meter(headers={'Content-Type': 'application/json'}, image="iapp_ai/media/base64.txt").json()
print(result)

# {'infer_time': '0.124', 'label': '19809', 'message': 'success', 'status': 200}

Full Example in Google Colaboratory

Last updated