Mercurial > hgrepos > Python > libs > ConfigMix
comparison doc/introduction.rst @ 122:21d92ff8cf31
Begin the handling of JSON-style configuration files
| author | Franz Glasner <hg@dom66.de> |
|---|---|
| date | Wed, 04 Apr 2018 09:45:29 +0200 |
| parents | c5b638f9c607 |
| children | b34ad08e7198 |
comparison
equal
deleted
inserted
replaced
| 121:0d378dcc018b | 122:21d92ff8cf31 |
|---|---|
| 6 ============ | 6 ============ |
| 7 | 7 |
| 8 The configurations can be read from different types of files: | 8 The configurations can be read from different types of files: |
| 9 | 9 |
| 10 - :ref:`YAML files <yaml-files>` | 10 - :ref:`YAML files <yaml-files>` |
| 11 - :ref:`JSON files <json-files>` | |
| 11 - :ref:`INI files <ini-files>` | 12 - :ref:`INI files <ini-files>` |
| 12 - :ref:`executable Python scripts <executable-python-scripts>` | 13 - :ref:`executable Python scripts <executable-python-scripts>` |
| 13 | 14 |
| 14 | 15 |
| 15 .. _yaml-files: | 16 .. _yaml-files: |
| 24 | 25 |
| 25 An example is: | 26 An example is: |
| 26 | 27 |
| 27 .. literalinclude:: ../tests/data/conf10.yml | 28 .. literalinclude:: ../tests/data/conf10.yml |
| 28 :language: yaml | 29 :language: yaml |
| 30 | |
| 31 | |
| 32 .. _json-files: | |
| 33 | |
| 34 JSON files | |
| 35 ---------- | |
| 36 | |
| 37 .. todo:: Document basic JSON usage | |
| 29 | 38 |
| 30 | 39 |
| 31 .. _ini-files: | 40 .. _ini-files: |
| 32 | 41 |
| 33 INI Files | 42 INI Files |
| 136 for Python configuration files | 145 for Python configuration files |
| 137 | 146 |
| 138 ``.yml`` or ``.yaml`` | 147 ``.yml`` or ``.yaml`` |
| 139 for YAML configuration files | 148 for YAML configuration files |
| 140 | 149 |
| 150 ``.json`` | |
| 151 for JSON configuration files | |
| 152 | |
| 141 ``.ini`` | 153 ``.ini`` |
| 142 for INI configuration files | 154 for INI configuration files |
| 143 | 155 |
| 144 | 156 |
| 145 .. _getting-values: | 157 .. _getting-values: |
