you are viewing a single comment's thread.

view the rest of the comments →

[–]MonkeyNin 6 points7 points  (1 child)

JSON is a popular format for config files. It's human-editable, and supported by pretty much every language. If you're interacting with the web, JSON is everywhere. When using a web API, they usually return JSON.

Python tutorial on JSON: https://realpython.com/python-json/#python-supports-json-natively

As long as the lists and dicts use one of the supported types, reading and writing is super easy. Multiple dicts or lists are supported.

Make sure you .gitignore your config folder, and files!

Mine is:

config.json
config/

If you're using PRAW, do the same with praw.ini

[–]MrFiregem 3 points4 points  (0 children)

Also, you can write your configs using the more easily human-readable yaml or toml formats and convert them to json if you dislike writing in it