Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

python-wordpress-0.1.2.tar.gz (3.2 kB view details)

Uploaded Source

File details

Details for the file python-wordpress-0.1.2.tar.gz.

File metadata

File hashes

Hashes for python-wordpress-0.1.2.tar.gz
Algorithm Hash digest
SHA256 f7f83703b80c6c0f5f60ff9a3f5bdb3d0d95a08a1d9bdd3da50c99e94b34a163
MD5 2032ddf161233e4d69631d6602f54372
BLAKE2b-256 bdda4173446259d34b0d0b6139281208872f45a090eca3adf622e801edc4579b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page