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()

Documentation

https://pywordapi.readthedocs.io/

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 Python 2 Python 3

Supported by

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