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.4.tar.gz
(2.2 kB
view hashes)
Built Distribution
Close
Hashes for confcompiler-0.0.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 464c96aa8dcdb7d69d1fe17f66a7476638fcd0b970c8d8bdc472651e3bfe4253 |
|
MD5 | 7282f28beb7c24a86481c76562a19cd3 |
|
BLAKE2b-256 | 2d31fef5b82097d62ac9e1faa96907adb42a1ceda601dd1805f781d8667c33d2 |