Simple use ini files
Project description
This is the simplest way to interact with a single ini file to store settings.
Attention! It is delivered together with logging to a file. You need to try to understand.
Use:
from simpleini import SETTINGS, logging
parsed_data = SETTINGS(<names_settings>, <required_settings>)
# names_settings - A string with the names of the settings stored in the file. If there is no file, it will be created and the program will be completed.
# required_settings - comma-separated list of required variables. 'all' - to check all variables
Example ini reader:
parsed_data = SETTINGS('settings1, settings2, settings3', 'all')
settings1 = parsed_data.settings1
settings2 = parsed_data.settings2
settings3 = parsed_data.settings3
Example logging:
logging('message for log') # it will write a file to the project folder log.txt and it will add incoming information to it
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
simpleini-0.1.5.tar.gz
(3.7 kB
view hashes)
Built Distribution
Close
Hashes for simpleini-0.1.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 658459a28f37586379a703f85ef5f5de3ff4bc284c9b71ab97b07ee9a45e6e63 |
|
MD5 | a76b91a7395e1d6c7a0bff860e347926 |
|
BLAKE2b-256 | 3d21371b5c4e2f71e8d4f147bab04e6490cade80a6e74b3fb5346a3c9cab77b0 |