使用WordPressXML-RPCAPI与WordPress的pythonic接口。
pywordpress的Python项目详细描述
使用WordPressXML-RPCAPI与WordPress的pythonic接口。
源代码:https://bitbucket.org/rgrp/pywordpress
用法
命令行
查看命令:
wordpress.py -h
您需要创建一个配置,其中包含wordpress的详细信息(url,login) 要使用的实例:
cp config.ini.tmpl config.ini # now edit away ... vim config.ini
python库
阅读代码文档:
>>> from pywordpress import Wordpress >>> help(Wordpress)
开发
要运行休息,您需要:
为要与之交互的测试创建WordPress安装(警告: 测试会删除已删除的所有页。不要根据 包含您关心的数据的wordpress实例)。
在运行测试的目录中创建一个名为test.ini的配置文件 发件人:
cp config.ini.tmpl test.ini # edit test.ini to reflect location and login or your test instance vi test.ini ...
要运行测试,请执行:
nosetests test_pywordpress.py