ctp: add ctpapi.py

Signed-off-by: Zhengwang Ruan <ruan.zhengwang@gmail.com>