1
1
# ConfigRW
2
- ** ConfigRW** is a simple reader and writer config files based on key-value or INI-structure.
3
2
4
- * Максимально сохраняет форматирование исходного файла (отступы, пробелы, комментарии, etc)
3
+ ConfigRW is a simple python module which read and write config files based on key-value or INI-structure.
5
4
6
- # Documentation
5
+ ## Key features
6
+
7
+ * Maximum preserves formatting of the source file (indents, spaces, comments, etc)
8
+ * Support non-section (for access for simple config files based on key-value)
9
+ * Inserting an option on an arbitrary string in the section
10
+ * Support multiple values of option
11
+ * Support options without values
12
+ * Support comments in a section
13
+ * Support indentation for options, values
14
+ * Secure file rewriting. Using * .new file on write, then renamed to original filename
15
+
16
+ ## Installation
17
+
18
+ Installation package to user python-library directory:
19
+
20
+ ``` bash
21
+ $ pip install --user configrw
22
+ ```
23
+
24
+ Or you can install package to global system directory of python libraries (not recommended):
25
+
26
+ ``` bash
27
+ $ sudo pip install configrw
28
+ ```
29
+
30
+ ## Documentation
7
31
8
32
You can find a full manual on how to use ConfigRW at [ readthedocs] ( https://configrw.readthedocs.io )
9
33
10
- # Quick start
34
+ ## Quick start
35
+
36
+ In next examples we will use the following INI file:
11
37
12
38
``` ini
13
39
# This is comment
@@ -34,7 +60,7 @@ second option = -100
34
60
ext3
35
61
```
36
62
37
- ## Access to non-section area
63
+ ### Access to non-section area
38
64
39
65
This is features needed if you want use simple key-value of config file
40
66
@@ -49,7 +75,7 @@ section['this is option'] = None # Setting the value
49
75
del section[' second option' ] # Deleting the option
50
76
```
51
77
52
- ## Access to section area
78
+ ### Access to section area
53
79
54
80
This is features needed if you want use INI config file
55
81
0 commit comments