import pywikibot
site = pywikibot.Site("test", "wikipedia")
site
APISite("test", "wikipedia")
page = pywikibot.Page(site, "test")
page
Page('Test')
page.exists()
True
page.text
'Test done: Sat, November 5. 1:04 PM: Test done.\ngood'
page.text = "Hello world\n~~~~"
page.save()
Page [[Test]] saved
print(page.text)
Hello world
[[User:Napsternxg|Napsternxg]] ([[User talk:Napsternxg|talk]]) 20:07, 18 November 2016 (UTC)