Python configuration file: Any file format recommendation? INI format still appropriate? Seems quite old school

前端 未结 8 1725
执念已碎
执念已碎 2020-12-04 10:43

I need to store configurations (key/value) for a Python application and I am searching for the best way to store these configurations in a file.

I run into Python\'s

8条回答
  •  死守一世寂寞
    2020-12-04 11:10

    INI is till totally OK and as other said, the format of your config file really depends from how you are going to use it.

    Personally I am a fan of YAML: concise, readable, flexible.

    Google seems to share my enthusiasm, as they use it too in the Google App Engine. The python parser is here.

提交回复
热议问题