Skip to main content

A Python library to manage WordPress sites via the REST API

Project description

Woppy

Woppy is a Python library to manage WordPress sites via the REST API.

Installation

pip install woppy

Usage

from woppy import Woppy

# Site URL, Username and Application Password
woppy = Woppy('https://your-wordpress-site.com', 'your-username', 'your-application-password')

# New Category
new_category = woppy.categories.create_category('New Category', 'This is a new category')

# New Tag
new_tag = woppy.tags.create_tag('New Tag', 'This is a new tag')

# New media upload
media_response = woppy.media.upload_media('/path/to/your/image.jpg')
media_id = media_response['id']

# New Post and assign the new category and tag
new_post = woppy.posts.create_post(
    title='My New Post',
    content='This is the content of my new post',
    status='publish',
    categories=[new_category['id']],  # Category ID
    tags=[new_tag['id']],              # Tag ID
    featured_media=media_id            # Media ID
)

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

woppy-0.2.0a0.tar.gz (2.8 kB view details)

Uploaded Source

Built Distribution

woppy-0.2.0a0-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

Details for the file woppy-0.2.0a0.tar.gz.

File metadata

  • Download URL: woppy-0.2.0a0.tar.gz
  • Upload date:
  • Size: 2.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.6

File hashes

Hashes for woppy-0.2.0a0.tar.gz
Algorithm Hash digest
SHA256 69da41bd9bcec063de832b220e9845bbe3c8ea44e8b466be16e5cc1ecc8dcaea
MD5 09e9de35c355ef2d9d79ce0ee842054a
BLAKE2b-256 519afe5ab6e87ce430fd1ad191635da195dcf9ce71516f08e33b669ed4eb677d

See more details on using hashes here.

File details

Details for the file woppy-0.2.0a0-py3-none-any.whl.

File metadata

  • Download URL: woppy-0.2.0a0-py3-none-any.whl
  • Upload date:
  • Size: 4.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.6

File hashes

Hashes for woppy-0.2.0a0-py3-none-any.whl
Algorithm Hash digest
SHA256 767959fb090158118dcbfe5a43c824c1aa33574e90f4a360fa1dc780785adeca
MD5 7e15df66c177593cce64b3ae9340f2e7
BLAKE2b-256 eaede2eb3c61ef8605e727fb6a9ec078e87f4d5da2ad304024b238303e7fc360

See more details on using hashes here.

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