Lobosque / python_wpapi

Simple python wrapper for the Wordpress REST API
MIT License
14 stars 9 forks source link

Python Wordpress API

Pypi Updates

Simple python wrapper around the Wordpress REST API. Supports authentication using Basic Auth.

All endpoints for the following resources are available:

These endpoints will be implemented soon:

Use the official api documentation as reference for what is possible.

Installation

pip install python_wpapi

Usage

from python_wpapi import WpApi

api1 = WpApi('http://example.com') # No authentication. Public endpoints only
api2 = WpApi('http://example.com', user='User', password='pwd') # Basic Auth

posts = api1.get_posts()
new_post = api2.create_post(title='Foo', content='Bar')

TODO

Tests

make test