DotConfCompiler

Compile, Read and update your .conf file in python

Read data

>>> from confcompiler import ConfRead
>>>
>>> Hostname = ConfRead('Config.conf', 'Hostname')
>>> Hostname
127.0.0.1
>>> type(Hostname)
<class 'str'>
>>>
>>> Connected = ConfRead('Config.conf', 'Connected')
>>> Connected
True
>>> type(Connected)
<class 'bool'>

Write data

>>> from confcompiler import ConfWrite
>>>
>>> ConfWrite('Config.conf', 'Hostname', '127.0.0.1')
>>> ConfWrite('Config.conf', 'Connected', True)

.conf cheat sheat

Commenting - All comments must start with '#' and must be on
             there on line, you cannot comment a line with
             data involved.

Variables  - Data must start with a variable name then continued
             with '=' after that the data.

GitHub

https://github.com/NotReeceHarris/DotConfCompiler