Compile, Read and update your .conf file in python
Project description
Supported Data Types
Str
Int
Float
Bool
Tuple
List
Dict
Complex
Bytes
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.
Data Types - Str, Int, Float, Bool, Tuple, List, Dict, Complex, Bytes
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
confcompiler-0.0.3.tar.gz
(2.2 kB
view hashes)
Built Distribution
Close
Hashes for confcompiler-0.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f1a22b97d75017636792e7d8f41bdb73c1ec48c5d0ffe05512c808628ec52b4f |
|
MD5 | 52ee907f35103a34efe35574669b65e0 |
|
BLAKE2b-256 | 986ffae88e129589580a168376f8fbca67b6d0d59ed81c92ec9581c220fea1e7 |