A Python client for the WordPress JSON API plugin
Project description
A simple Python library for talking to Wordpress in JSON. This library relies on the [WordPress JSON API plugin][1]. This won’t work if your WordPress site doesn’t have the plugin installed.
[1]: http://wordpress.org/extend/plugins/json-api/ “WordPress JSON API”
Install:
$ pip install python-wordpress
Or git clone and python setup.py install and such.
Usage:
>>> from wordpress import WordPress >>> wp = WordPress('http://example.com/blog/') >>> posts = wp.get_recent_posts()
For now, this only covers the read portions of the API under the core controller. See the [WordPress JSON API documentation][2] for details.
[2]: http://wordpress.org/extend/plugins/json-api/other_notes/
Tests assume a WordPress blog running on [MAMP][3] at http://localhost:8888/wordpress, but you can change that by setting WORDPRESS_BLOG_URL as an environment variable, like so:
WORDPRESS_BLOG_URL=http://wordpress.local.host python test.py
[3]: http://www.mamp.info/en/index.html “MAMP!”
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file python-wordpress-0.1.3.tar.gz
.
File metadata
- Download URL: python-wordpress-0.1.3.tar.gz
- Upload date:
- Size: 3.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | feb305a7f3697af4fc558be5787c429db23f1e6fd43d8a17caf4ba6d60ac508c |
|
MD5 | b6da12546f0cc780db0871ae24b1a617 |
|
BLAKE2b-256 | 46c6e5fcb4eff13f68d4f852a697f68af18521c83c792535b8ef1c9f3fb03500 |