Command line interface to read and write keys/values to/from toml files
Project description
toml-cli
Command line interface for toml files.
This can be usefull for getting or setting parts of a toml file without an editor. Which can be convinient when values have to be read by a script for example in continuous development steps.
Install
pip install toml-cli
Get a value
toml get --toml-path pyproject.toml tool.poetry.name
toml get --toml-path pyproject.toml tool.poetry.authors[0]
toml get --toml-path pyproject.toml tool.poetry.name --default marc
Set a value
toml set --toml-path pyproject.toml tool.poetry.version 0.2.0
toml set --toml-path pyproject.toml tool.poetry.authors[0] "Marc Rijken <marc@rijken.org>"
When the index exists, the item is changed. Otherwise, the item will be added to the list.
Add a section
toml add_section --toml-path pyproject.toml tool.poetry.new_section
Unset a value
toml unset --toml-path pyproject.toml tool.poetry.version
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
Built Distribution
File details
Details for the file toml_cli-0.7.0.tar.gz
.
File metadata
- Download URL: toml_cli-0.7.0.tar.gz
- Upload date:
- Size: 6.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.12.1 Linux/6.5.0-1022-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e5afdcc8563b6c9dd9096b041c9fa8c9a100411325e76e5da56c060b64858a75 |
|
MD5 | 366157bba0b5f2f8bfdd76b16ed47e2d |
|
BLAKE2b-256 | 113ad2abbfaa1293442aec63fc98b66862d72eab3d7c4f673a16591c99f649bc |
File details
Details for the file toml_cli-0.7.0-py3-none-any.whl
.
File metadata
- Download URL: toml_cli-0.7.0-py3-none-any.whl
- Upload date:
- Size: 7.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.12.1 Linux/6.5.0-1022-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 49f460ead043a86cc859ef7d710a64b912ac3596700951c9fb18491382716907 |
|
MD5 | 981c86f32a31a1522269e7564a8c0691 |
|
BLAKE2b-256 | fd72ca812976bdf9329c0fa641c4c4740b4183520ae4e30a1b3b88d5c8392658 |