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

1
$ pip install iapp_ai
Copied!
Note: It can be either pip or pip3 depend on your environment.

Calling Power Meter API

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

Example Usages

1
import iapp_ai
2
3
4
# You can request API key at https://ai.iapp.co.th
5
apikey = 'XXXXX_Your_API_Key_XXXXX'
6
7
api = iapp_ai.api(apikey)
8
9
# Power Meter OCR API required a base64 image in text file path (Only image string)
10
result = api.power_meter(headers={'Content-Type': 'application/json'}, image="iapp_ai/media/base64.txt").json()
11
print(result)
12
13
# {'infer_time': '0.124', 'label': '19809', 'message': 'success', 'status': 200}
Copied!

Full Example in Google Colaboratory

Google Colaboratory
Full Example of iApp AI API in Google Colaboratory
Copy link
Contents