import pywikibot
site = pywikibot.Site('test', 'wikipedia')
Test Wiki
  File "<ipython-input-4-3c211f3169a3>", line 1
    Test Wiki
            ^
SyntaxError: invalid syntax
TestWiki
---------------------------------------------------------------------------
NameError                                 Traceback (most recent call last)
<ipython-input-5-65201be421a1> in <module>()
----> 1 TestWiki

NameError: name 'TestWiki' is not defined
site
APISite("test", "wikipedia")
page = pywikibot.Page(site, 'test')
page.exists()
True
page = pywikibot.Page(site, 'test')
page.exists()
True
import pywikibot

site = pywikibot.Site('test', 'wikipedia')
page = pywikibot.Page(site, 'test')

page.text = 'Hello world!'
page.save()
Page [[test:Test]] saved