Skip to main content

Manage DokuWiki via XML-RPC API.

Project description


This module has for purpose to manager DokuWiki by using the XML-RPC API. Details of the API are available at The module is compatible with both python 2 and 3.


Module is on PyPi, so pip install dokuwiki is enough.

Otherwise sources are on github:


Functions for manipulate pages and medias are separate in two objects accessible via the ‘pages’ and ‘medias’ attributes of the DokuWiki object.


Dates returned by some commands are in UTC format. This function convert this date to the local time.

Dokuwiki.send(command, *args, **kwargs)

Send a command to the XML-RPC server (by example: dokuwiki.getVersion). *args and **kwargs are both arguments and options of the command pass in the request.


Send the command dokuwiki.getVersion (


Send the command dokuwiki.getTime (


Send the command dokuwiki.getXMLRPCAPIVersion (


Send the command wiki.getRPCVersionSupported


Send the command dokuwiki.getTitle (

Dokuwiki.login(user, password)

Send the command dokuwiki.login (

Dokuwiki.pages.list(namespace, **options)

Send the command dokuwiki.getPagelist (


Send the command wiki.getRecentChanges (

Send the command (

Dokuwiki.pages.versions(pagename, offset=0)

Send the command wiki.getPageVersions (, version=’’)

Send the command wiki.getPageInfo (

Dokuwiki.pages.get(pagename, version=’’)

Send the command wiki.getPage ( or wiki.getPageVersion ( if version is given.

Dokuwiki.pages.append(pagename, content, **options)

Send the command dokuwiki.appendPage (

Dokuwiki.pages.html(pagename, version)

Send the command wiki.getPageHTML ( or wiki.getPageHTMLVersion ( if version is given.

Dokuwiki.pages.set(pagename, content, **options)

Send the command wiki.putPage (


Send the command wiki.putPage with an empty content.


Send the command dokuwiki.setLocks ( This command take two lists of pages to lock and unlock. This send the command with the first list having the pagename and the second list empty.


Send the command dokuwiki.setLocks ( This command take two lists of pages to lock and unlock. This send the command with the first list empty and the second list having the pagename.


Send the command wiki.aclCheck (


Send the command wiki.getRecentMediaChanges (

Dokuwiki.medias.list(namespace, **options)

Send the command wiki.getAttachments (

Dokuwiki.medias.get(media, dirpath, filename=’’, overwrite=False)

Send the command wiki.getAttachment ( Save the media in dirpath directory. If filename is given, the file is rename. overwrite parameter indicate if the file must be ovewrite if it already exists.

Send the command wiki.getAttachmentInfo (

Dokuwiki.medias.add(media, filepath, overwrite)

Send the command wiki.putAttachment ( with filepath encoded in base64 as data. overwrite indicate that an existing file will be overwrite.


Send the command wiki.deleteAttachment (



import sys
from dokuwiki import DokuWiki, DokuWikiError

    wiki = DokuWiki('', 'myuser', 'mypassword')
 except DokuWikiError as err:

print(wiki.version) # => 'Release 2012-10-13 "Adora Belle"'
print(wiki.pages.list()) # list all pages of the wiki
print(wiki.pages.list('my:namespace') # list all pages in the given namespace
print(wiki.pages.get('my:namespace:page')) # print the content of the page

Release notes


  • Implement DokuWiki XML-RPC commands
  • Compatible with both python 2 and 3

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 dokuwiki, version 0.1
Filename, size File type Python version Upload date Hashes
Filename, size dokuwiki-0.1.tar.gz (3.8 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page