User:Abbe98/BotAcademy/pywikibot Project Setup

This requires you to have installed pywikibot.

For your new project you will need three files, two living in your project directory. One is the file where your program lives. Lets call that file hello.py for now. It should contain: import pywikibot Then you also need a file for storing your password, note that this should not be in a public directory on for example a web server(you should probably add it to your .gitignore file to). The name of this file can be what ever you want. File syntax : ('username', 'password') The last file you will need to have in your project directory is a copy of your user-config.py file. In addition to your existing settings you haft to add a variable pointing to your password file. Example: password_file = "/path/to/password/file" Now try running your hello.py file if you don't see any errors you are all set and can use pywikibot as a framework together with other Python frameworks such as Django.