SocialText Rest API的Python绑定
python-socialtext的Python项目详细描述
这是socialtext的rest api的客户端。这个项目的目标是提供一个可扩展的库,帮助您集中精力构建利用socialtext的功能的应用程序,而不是担心http方法和状态代码。
您可以在以下位置阅读文档: http://python-socialtext.readthedocs.org/
Installation
您可以使用pip或easy_install安装python socialtext:
pip install python-socialtext # or easy_install python-socialtext
测试使用nose,可以使用:
python setup.py test # or nosetests
您可以使用Sphinx在本地生成文档:
cd docs make html # windows: use make.bat # open the _build/index.html document in your browser
Python API
快速入门:
from socialtext import Socialtext st = Socialtext(url=ST_URL, username=USERNAME, password=PASSWORD) st.signals.create("This is a signal from the API!") <Signal: 1234> signal.delete() st.pages.list("ws-name") <Page: test_page>, <Page: test_page_2>, <Page: test_page_3> ws = st.workspaces.get("ws-name") st.pages.list(ws) <Page: test_page>, <Page: test_page_2>, <Page: test_page_3>
Contributing
发展发生在Github。你可以在那里提交错误报告和请求。