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.

Source Distribution

pywordapi-1.0.9.tar.gz (15.7 kB view hashes)

Uploaded source

Built Distribution

pywordapi-1.0.9-py2.py3-none-any.whl (4.3 kB view hashes)

Uploaded py2 py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page