mbk88 / dollarbot

Dollar-BOT
MIT License
0 stars 0 forks source link

Use json for the configuration file #2

Closed facundoolano closed 6 years ago

facundoolano commented 6 years ago

Manually handling a \n separated configuration file is not very convenient, and it's hard to tell what each configuration value is. Considering you're also using json in your code, a good option would be to use a json object for configuration:

{
  "slack_hook": "INSERT YOUR HOOK HERE",
  "threshold": 0.5
}
unbalancedparentheses commented 6 years ago

I agree with using something better than manually handling a custom configuration file. However, if think json configs are not standard on python. Let's check it. I would use a yaml config file.

mbk88 commented 6 years ago

As discussed, I used 'conf.yml' file with following format:

slack:
 webhook: INSERT WEBHOOK URL HERE
 channel: general
dollar:
 threshold: 0.5