import mwclient # 1. Connect to the Mediawiki client logging in as a user site = mwclient.Site('pzwiki.wdka.nl', path='/mw-mediadesign/') site.login( username='username', password='password' ) # 2. Get a page to edit. If it doesn't exist it will be created page = site.pages['A test page'] # 3. Get the text from the page text = page.text() # 4. Edit the contents text += 'Editing the test page from the wiki' # 5. Write the modification page.edit(text, 'Summary of the edit')