Once Python 3 is installed alongside Pip:
python3 -m pip install git+https://gitlab.com/whoatemybutter/pyini.git
PyINI supports:
- Section nesting (up to two sections)
- Global declarations
- Reading and writing INI data
- Arrays
- Booleans
import pyini
with open("my_ini_file.ini") as file:
# Load INI data through file
ini: dict = pyini.load(file)
# Above is the same as:
pyini.loads(file.read())
# Write dictionary to file as INI data
pyini.dump(ini, file)
# Return dictionary as string of INI data
pyini.dumps(ini)
Any dictionary can pyini.dump()
to valid INI data.
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
If there is an individual issue you would like to bring attention to, please open one here.
Distributed under the GPLv3 license.
See the included LICENSE for the full text, or visit GNU's website.