Fridge is a persistent dict-like object useful for storing settings or any other JSON-serializable data.
Fridge officially supports Python 3.3, 3.2 and 2.7.
from fridge import Fridge
with Fridge('/home/user/config') as fr:
username = fr['username']
password = fr['password']
fr.setdefault('login_count', 0)
fr['login_count'] += 1