DIG ini-editor
Simple command line INI editor.
- Get list of sections
- Get list of keys from section
- Get value of key from section
- Add/Edit value of key from section
- Delete key from section
- Delete entire section
- Check if section exists
- Check if section and key exists
By default, all output will be written into stdout. It can be changed with option --output FILENAME or --in-place wich will use the input file as output.
The input filename "-" is reserved to read from stdin (cat file.ini | ini-editor ACTION - …)
Usage
python -m dig_ini_editor ACTION
or
ini-editor ACTION
ACTION must be one of:
• get
ini-editor get filename [section [key]]
- If
sectionis not set, will return a list of sections. - If
keyis not set, will return a list of keys fromsection. - Otherwise will return the value of
keyfromsection.
• set
ini-editor set filename section key value
Will add or replace, with value, the value of key from section.
• delete
ini-editor delete filename section [key]
- If
keyis not set, will remove entiresection. - Otherwise will remove only the
keyfromsection.
• exists
ini-editor exists filename section [key]
Will return "true" and exit code 0 if the condition is satisfied, otherwise return "false" and exit code non-zero.
- If
keyis not set, will only check ifsectionexists.
Installation
From PyPI (preferred):
python -m pip install dig-ini-editor
From github release:
python -m pip install "https://github.com/DIG-/python-ini-editor/releases/download/1.0.1/dig_ini_editor-1.0.1-py3-none-any.whl"
or
python -m pip install "https://github.com/DIG-/python-ini-editor/releases/download/1.0.1/dig_ini_editor.tar.gz"
From github main branch:
python -m pip install "git+https://github.com/DIG-/python-ini-editor.git@master#egg=dig_git_ignore"
License
- You can use and redist freely.
- You can also modify, but only for yourself.
- You can use it as a part of your project, but without modifications in this project.
Metadata
Release files for dig-ini-editor 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| dig-ini-editor-1.0.1.tar.gz | 7.4 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| dig_ini_editor-1.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 13.7 kB
Release files / dig-ini-editor-1.0.1.tar.gz
| Download URL | dig-ini-editor-1.0.1.tar.gz |
|---|---|
| Size | 7.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4140c1ae157c74400261986176a259a55552444ca8fce763bc9f8d7bece6b3c9
|
|
BLAKE2b-256 checksum How to use checksums |
a2cacbf67adb4c58b7f598e3e3f5c1c12a2872eea43a9da0c2f52a78307a6a12
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.5
|
Release files / dig_ini_editor-1.0.1-py3-none-any.whl
| Download URL | dig_ini_editor-1.0.1-py3-none-any.whl |
|---|---|
| Size | 6.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
67f08caf94e694600dd0e10c29718533a347edbfe91ae4d90dc1e916457a3d23
|
|
BLAKE2b-256 checksum How to use checksums |
25df8d2710844c1af9747e660f1979ba87d67d9cf8f0a98dcc74d086d0afeb31
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.5
|
Security for dig-ini-editor 1.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.