etherpad lite的http api的python接口
etherpad_lite的Python项目详细描述
etherpad lite是一个web服务,允许用户组进行实时文档协作。http://etherpad.org/
python-etherpad_-lite为etherpad lite的http api提供了一个接口。
安装
pip install etherpad_lite
python-etherpad_-lite没有依赖项,并且与python 2和3都兼容。
用法
来自python:
from etherpad_lite import EtherpadLiteClient c = EtherpadLiteClient(base_params={'apikey':'secret_from_APIKEY.txt'}) c.createPad(padID='test', text="Lorem ipsum dolor sit amet.")
从命令行:
$ python -m etherpad_lite -p apikey=secret_from_APIKEY.txt => Welcome to the Etherpad Lite shell ! => Command example: createPad padID=test text="Lorem ipsum dolor sit amet." % createPad padID=test text="Lorem ipsum dolor sit amet." ok % getHTML padID=test {u'html': u'Lorem ipsum dolor sit amet.<br>'} % deletePad padID=test ok
有关api函数及其参数的列表,请参阅etherpad lite的文档。