Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Wordpresslib is a wrapper to post to a Wordpress blog in Python. Started by Michele Ferretti. This version adds support for tags (keywords).

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 .gitignore
Octocat-spinner-32 AUTHORS
Octocat-spinner-32 LICENSE
Octocat-spinner-32 README.markdown
Octocat-spinner-32 TODO
Octocat-spinner-32 example.py
Octocat-spinner-32 python.jpg
Octocat-spinner-32 setup.py
Octocat-spinner-32 test.py
Octocat-spinner-32 wordpresslib.py
README.markdown

WordPress Python Library

A simple python library for WordPress (XML-RPC interface).

The following methods are supported:

  • Publishing new post (title, body, tags, categories, custom fields…)
  • Editing old post
  • Publishing draft post
  • Deleting post
  • Changing post categories
  • Getting blog and user informations
  • Upload multimedia files like movies or photos
  • Getting last recents post
  • Getting last post
  • Getting Trackbacks of post
  • Getting Pingbacks of post

Example

import wordpresslib

url = "http://www.mysite.com/wordpress/xmlrpc.php"

wp = wordpresslib.WordPressClient(url, 'username', 'password')

wp.selectBlog(0)

post = wordpresslib.WordPressPost()

post.title = 'Title'
post.description = 'Content'
post.tags = ["wordpress", "lib", "python"]

# Set to False to save as a draft
idPost = wp.newPost(post, True)

Contributing

Very happy to have contributions to this project. Please write tests for any new features and always ensure the current tests pass.

License: GNU/GPL

Thanks

This project has been started by Michele Ferretti in 2005.

Original project was here:

Something went wrong with that request. Please try again.