Skip to content

Lobosque/python_wpapi

Repository files navigation

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:

  • Posts
  • Media
  • Post Types
  • Taxonomies
  • Categories
  • Tags
  • Users

These endpoints will be implemented soon:

  • Post Revisions
  • Pages
  • Post Types
  • Post Statuses
  • Comments

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

  • Documentation
  • OAuth authentication

Tests

make test
  • Free software: MIT licensea

About

Simple python wrapper for the Wordpress REST API

Resources

License

Stars

Watchers

Forks

Packages

No packages published