Skip to content

Python dictionaries backed by real json files

Notifications You must be signed in to change notification settings

Azeirah/mb-confy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Confy: A dictionary backed by a real .json file

Confy is a dictionary with a .save() method. Acts exactly the same as a regular dictionary otherwise.

Install

pip install mb-confy

Use

from confy import Confy

configPath = "config.json"
config = Confy(configPath)

if "timesOpened" in config:
    timesOpened = config["timesOpened"]
else:
    timesOpened = 0

print("Opened {} times".format(timesOpened))
config["timesOpened"] = timesOpened + 1

Licensing

MIT

Author

Made by Martijn Brekelmans. This project is used in SMG music display.

About

Python dictionaries backed by real json files

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages