Skip to main content

Compile, Read and update your .conf file in python

Project description

Python3 PyPI PyPI format PyPI downloads PyPI downloads

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)

Uploaded Source

Built Distribution

confcompiler-0.0.4-py3-none-any.whl (6.1 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page