Skip to main content

No project description provided

Project description

toml2json

CI Crates.io PyPI - Version

A command-line tool that converts TOML to JSON. Nothing more, nothing less.

Installation

Cargo

cargo install toml2json

PyPI

NOTE: toml2json on PyPI was originally a pure Python CLI; ownership of the name on PyPI was transferred to woodruffw for this Rust-based CLI in August 2025. Versions prior to 0.1.0 on PyPI are the old pure Python version.

uvx toml2json
uv tool install toml2json
pipx install toml2json

# or pip install, if you're in a virtual environment

Homebrew

toml2json is available via Homebrew:

brew install toml2json

Alpine Linux

toml2json is available for Alpine Edge. It can be installed via apk after enabling the testing repository.

apk add toml2json

Arch Linux

If you're using Arch Linux, you can install toml2json using an AUR helper. For example:

paru -S toml2json

Nixpkgs

nix-env --install toml2json

Please let us know if you package toml2json for another package manager or ecosystem!

Usage

Convert TOML on stdin to JSON, filtering it through jq:

$ toml2json <<< 'wow = "amazing"' | jq

Produces:

{
  "wow": "amazing"
}

Convert TOML from a file and pretty-print it without jq:

$ toml2json --pretty ~/.config/kbs2/kbs2.conf

Produces:

{
  "age-backend": "RageLib",
  "error-hook": "~/.config/kbs2/hooks/error-hook-notify",
  "keyfile": "REDACTED-GO-AWAY",
  "public-key": "REDACTED-GO-AWAY",
  "reentrant-hooks": false,
  "store": "~/.kbs2-store",
  "wrapped": true,
  "generators": [
    {
      "alphabet": "abcdefghijklmnopqrstuvwxyz0123456789(){}[]-_+=",
      "length": 16,
      "name": "default"
    }
  ],
  "commands": {
    "edit": {
      "editor": "subl -w",
      "post-hook": "~/.config/kbs2/hooks/push-repo"
    },
    "new": {
      "generate-on-empty": true,
      "post-hook": "~/.config/kbs2/hooks/push-repo"
    },
    "pass": {
      "clear-after": true,
      "clear-hook": "~/.config/kbs2/hooks/pass-clear-notify",
      "clipboard-duration": 10,
      "x11-clipboard": "Clipboard"
    },
    "rm": {
      "post-hook": "~/.config/kbs2/hooks/push-repo"
    }
  }
}

Amazing. What more could you want? Hopefully nothing, because it will never do anything else.

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

toml2json-1.3.2.tar.gz (9.8 kB view details)

Uploaded Source

Built Distributions

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

toml2json-1.3.2-py3-none-win_amd64.whl (398.5 kB view details)

Uploaded Python 3Windows x86-64

toml2json-1.3.2-py3-none-win32.whl (377.7 kB view details)

Uploaded Python 3Windows x86

toml2json-1.3.2-py3-none-musllinux_1_2_x86_64.whl (567.7 kB view details)

Uploaded Python 3musllinux: musl 1.2+ x86-64

toml2json-1.3.2-py3-none-musllinux_1_2_armv7l.whl (545.0 kB view details)

Uploaded Python 3musllinux: musl 1.2+ ARMv7l

toml2json-1.3.2-py3-none-musllinux_1_2_aarch64.whl (541.8 kB view details)

Uploaded Python 3musllinux: musl 1.2+ ARM64

toml2json-1.3.2-py3-none-manylinux_2_28_x86_64.whl (525.7 kB view details)

Uploaded Python 3manylinux: glibc 2.28+ x86-64

toml2json-1.3.2-py3-none-manylinux_2_28_armv7l.whl (523.3 kB view details)

Uploaded Python 3manylinux: glibc 2.28+ ARMv7l

toml2json-1.3.2-py3-none-manylinux_2_24_aarch64.whl (503.4 kB view details)

Uploaded Python 3manylinux: glibc 2.24+ ARM64

toml2json-1.3.2-py3-none-macosx_11_0_arm64.whl (474.6 kB view details)

Uploaded Python 3macOS 11.0+ ARM64

toml2json-1.3.2-py3-none-macosx_10_12_x86_64.whl (501.8 kB view details)

Uploaded Python 3macOS 10.12+ x86-64

File details

Details for the file toml2json-1.3.2.tar.gz.

File metadata

  • Download URL: toml2json-1.3.2.tar.gz
  • Upload date:
  • Size: 9.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: maturin/1.9.4

File hashes

Hashes for toml2json-1.3.2.tar.gz
Algorithm Hash digest
SHA256 5779a64d8686ee3fe83f602a12510d3f01890d88baa6fdaed28b6a129f5851cf
MD5 dcc0e8b06a2ce30f467f6e29d4c89d81
BLAKE2b-256 7a17e9e14ed6a2d8b17fd3c7a41748bf1dc647d4cedcc7dc8293035e20c60833

See more details on using hashes here.

File details

Details for the file toml2json-1.3.2-py3-none-win_amd64.whl.

File metadata

  • Download URL: toml2json-1.3.2-py3-none-win_amd64.whl
  • Upload date:
  • Size: 398.5 kB
  • Tags: Python 3, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: maturin/1.9.4

File hashes

Hashes for toml2json-1.3.2-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 44ebc2173f7a206ebb3c7bd6d49c8fde7c91649d2151ded99f92e5c47f8b9873
MD5 31dd77570bb2868285cc68f6d92eafe5
BLAKE2b-256 98fc066ce0125927add5865b6af9e1a14f907f00553c414317fab0e2fe98fd01

See more details on using hashes here.

File details

Details for the file toml2json-1.3.2-py3-none-win32.whl.

File metadata

  • Download URL: toml2json-1.3.2-py3-none-win32.whl
  • Upload date:
  • Size: 377.7 kB
  • Tags: Python 3, Windows x86
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: maturin/1.9.4

File hashes

Hashes for toml2json-1.3.2-py3-none-win32.whl
Algorithm Hash digest
SHA256 224d485a5ff68e977b30ce974106649363e45def2d354b5c034bb4fa4d495986
MD5 a1b28cfec7409528ae0b5f7b01127c31
BLAKE2b-256 fc486cf9d982dd511a855563b8d47f17c224cd293282c34ed68fe5b3caa4dbd2

See more details on using hashes here.

File details

Details for the file toml2json-1.3.2-py3-none-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for toml2json-1.3.2-py3-none-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 73a73911c60e9bc95cbd1832ef12021a550d635803b09ad8ed911964e2857d5b
MD5 510e501fef23801a156966cfb547bdbe
BLAKE2b-256 12ec5aa3214d35e5f2975eb89d22d669a07b4c33de070b48602d8962dc9506d0

See more details on using hashes here.

File details

Details for the file toml2json-1.3.2-py3-none-musllinux_1_2_armv7l.whl.

File metadata

File hashes

Hashes for toml2json-1.3.2-py3-none-musllinux_1_2_armv7l.whl
Algorithm Hash digest
SHA256 19a177665f2df66bf1a75e96ce13bf5ce896641cc2f5978a1ce729ab332cfff8
MD5 7287cc2f390bda4cfb402fb54d2b3d87
BLAKE2b-256 4aaeb2474499e7d046cb739546fc543b84267efe7b583cfc8c62c2ba713b3819

See more details on using hashes here.

File details

Details for the file toml2json-1.3.2-py3-none-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for toml2json-1.3.2-py3-none-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 58075ad6d9606f3c6f10959ff6c08cc53dafb3d433d36c21b0f22b9bf5b11b25
MD5 dc22aecdff1b72e31bbf36beef18d370
BLAKE2b-256 68431713887faff482ca6b406a9d87ffacdff39e37c0c65559f289687565f261

See more details on using hashes here.

File details

Details for the file toml2json-1.3.2-py3-none-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for toml2json-1.3.2-py3-none-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 fc14de8966c4b9373bb5088d277139d5c208f10fbc152614199a8945da86c842
MD5 5fc2692efebf0f51fb3f448b7c8d689a
BLAKE2b-256 da0408438a407fa529df376c092fdbf662b95e324eb4b9c521a46aaf631d2b81

See more details on using hashes here.

File details

Details for the file toml2json-1.3.2-py3-none-manylinux_2_28_armv7l.whl.

File metadata

File hashes

Hashes for toml2json-1.3.2-py3-none-manylinux_2_28_armv7l.whl
Algorithm Hash digest
SHA256 a87e97eef07e483fa0f3357d68ce915ed8df2a755f7d70f230ebbb90e396e6df
MD5 11d4b703f40d506f8fbc15d24a18d13a
BLAKE2b-256 3627a13eb406d53b1256c5b8bf136bdf0659509adab23dd171f743769dd36bf2

See more details on using hashes here.

File details

Details for the file toml2json-1.3.2-py3-none-manylinux_2_24_aarch64.whl.

File metadata

File hashes

Hashes for toml2json-1.3.2-py3-none-manylinux_2_24_aarch64.whl
Algorithm Hash digest
SHA256 0dbea9ad8e60a32302d7620ff87a85e1eb12705b2f5cd539b90a90808e96e09b
MD5 2483d61e1e4a6aa3b2cf702d467e0a3c
BLAKE2b-256 334d0b83f734306dc7cea7815144f7e2d27d8d8631e37b294f88a7c1bf74485d

See more details on using hashes here.

File details

Details for the file toml2json-1.3.2-py3-none-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for toml2json-1.3.2-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 504c966de5d1b906d5e152fdb965aa5da894ee187d1e1d3e9b795fb76a11c20a
MD5 d840354b994cc2c8915e084046c01eb8
BLAKE2b-256 917becfd8e0fb67224d676af6e6735c74adf39fb817a672168ac9c388c4e1d19

See more details on using hashes here.

File details

Details for the file toml2json-1.3.2-py3-none-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for toml2json-1.3.2-py3-none-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 9d4b40b8f1cddf623e94a88d7c26950e60d7dad363b453109263c97579e398f2
MD5 afd6e1d43f5827fa2575a0e54ca90e4a
BLAKE2b-256 ba34900ce62e4641fe7caced177fc61ea4f1600e1e10738f475039dc32fca90f

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