I am currently writing a script on a raspberryPi (in python) to automate some tasks in online accounts. While some of these online accounts have nice APIs I can use, others do not and I have to resort to using mechanize to scrape them. This presents the problem of having to store login information. I don't want to store them as plaintext, and storing in RAM would be tedious to type in every password every time I boot the pi.
My question then is, what is the best way to go about this? Searching through previous posts indicates that hashing it would be best. However, there is then no way to actually recover the passwords from the hash to login to each website. The passwords must be submitted to the web form as plaintext (just like a normal login). Any help would be appreciated.