Skip to main content

Command line interface to read and write keys/values to/from toml files

Project description

toml-cli

Build

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

Search with JMESPath

toml search --toml-path pyproject.toml tool.uv.index[*].name

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

toml_cli-0.8.1.tar.gz (24.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

toml_cli-0.8.1-py3-none-any.whl (7.4 kB view details)

Uploaded Python 3

File details

Details for the file toml_cli-0.8.1.tar.gz.

File metadata

  • Download URL: toml_cli-0.8.1.tar.gz
  • Upload date:
  • Size: 24.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.0

File hashes

Hashes for toml_cli-0.8.1.tar.gz
Algorithm Hash digest
SHA256 cb97d2fb265d6838db998625b97e45a0831c8ac3ee643e7566539f9473ef5286
MD5 569476bb36ae11e5dd167daabe4d7d56
BLAKE2b-256 a0de3e59683d678926d878883576ca6737f4fca45f88197590ba41f7620722a7

See more details on using hashes here.

File details

Details for the file toml_cli-0.8.1-py3-none-any.whl.

File metadata

  • Download URL: toml_cli-0.8.1-py3-none-any.whl
  • Upload date:
  • Size: 7.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.0

File hashes

Hashes for toml_cli-0.8.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ebd1672e2b512022c4db2ba01658bff17ec9bb868b64ddee29484d1517ce0d98
MD5 e25e2e5fed493dee1d66f4a3d43c6241
BLAKE2b-256 7ffb44ef7148ed5b55e519c7d205ba4281087fcf947d96a1e6d001ae6c1d4c34

See more details on using hashes here.

Supported by

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