Currently i save WIFI credentials in a json, looks like:
Code: Select all
{
"wifi": {
"your-ssid-1": "Your-Password-1",
"your-ssid-2": "Your-Password-2"
}
}
In my project exists some other dynamic settings. The user can change this via web interface: The timers and his time zone offset.
Basically, I see these possibilities to save these kind of data:
- save/restore json files
- create/parse a own format
- Create .py files with e.g.: and use __import__ and getattr
Code: Select all
FOO=const(123)
Any comments, suggestions?
EDIT: If I just think about it: If i respect DRY and KISS then only json comes into consideration, isn't it?