import pywikibot
site = pywikibot.site('test', 'wikipedia')
site
page = pywikibot.Page(site,'test')
page.exists()
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-1-0f7c127a94f2> in <module>()
      1 import pywikibot
----> 2 site = pywikibot.site('test', 'wikipedia')
      3 site
      4 page = pywikibot.Page(site,'test')
      5 page.exists()

TypeError: 'module' object is not callable
import pywikibot
site = pywikibot.site('test', 'wikipedia')
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-3-698102074c5f> in <module>()
----> 1 site = pywikibot.site('test', 'wikipedia')

TypeError: 'module' object is not callable
site = pywikibot.Site('test', 'wikipedia')
site
APISite("test", "wikipedia")
page = pywikibot.Page(site, 'test')
page.exists()
True
page.text
'Hello world!!'
page.save()
Page [[Test]] saved