DefensePointSecurity / threat_note

DPS' Lightweight Investigation Notebook
Apache License 2.0
421 stars 97 forks source link

Load application configuration from file #159

Open tsmolka opened 8 years ago

tsmolka commented 8 years ago

Hi, what about moving settings to an external file? It's a good practice and simplifies configuration. Other settings (e.g. db file) should ideally be moved there as well.

sroberts commented 8 years ago

So that goes pretty aggressively against the 12 Factor App idea of keeping configuration out of code.

k3vb0t commented 8 years ago

Just to chime into this, with respect to the 12 Factor App rules, I use configparser and usually make a config.ini( or something there of) that works really well imo. As long as .gitignore has that file in it, you should be good to go. TBH, I hate having to remove and re-add my API keys to the file I'm pushing/pulling each time.

To note, I'm not even close to being a developer, but as someone who does numerous pushes and pulls, I like the notion. Just my 1 cent.