Skip to main content

Python Wordpress Api Library

Project description

Python Wordpress Api Library

Pywordapi allows a simple way to get data in and out of WordPress over HTTP, using python and Wordpress REST API.

Installation

To install the Pywordapi package:

pip install pywordapi

Usage

Get posts

from pywordapi import Pywordapi
api_url = "https://demo.wp-api.org/"
api = Pywordapi.WpRest(api_url)
results = api.get_posts()

Get categories

from pywordapi import Pywordapi
api_url = "https://demo.wp-api.org/"
api = Pywordapi.WpRest(api_url)
results = api.get_categories()

Variable results will return instance of type list (of dict).

Using proxy

from pywordapi import Pywordapi
api_url = "https://demo.wp-api.org/"
proxy_url = "http://username:password@IP_ADDRESS:PORT"
api = Pywordapi.WpRest(api_url, proxy_url)
results = api.get_posts()

Changelog

1.0.0 (2019-06-21)

  • First release on PyPI.

Project details


Download files

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

Files for pywordapi, version 1.0.9
Filename, size File type Python version Upload date Hashes
Filename, size pywordapi-1.0.9-py2.py3-none-any.whl (4.3 kB) File type Wheel Python version py2.py3 Upload date Hashes View hashes
Filename, size pywordapi-1.0.9.tar.gz (15.7 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page