TOML


Tom's Obvious, Minimal Language is a file format for configuration files. It is designed to be easy to read and write by being minimal and by using human-readable syntax. The project standardizes the implementation of the ubiquitous INI file format, removing ambiguity from its interpretation. Originally created by Tom Preston-Werner, the TOML specification is open source. TOML is used in a number of software projects and is implemented by all popular programming languages.

Syntax

TOML's syntax primarily consists of, among other constructs, key = value pairs, , and #. TOML's syntax is a superset of the.INI format but has one agreed-upon formal specification, whereas the.INI format suffers from many competing variants.
Exceeding stringly-typed semantics, TOML supports the data types string, integer, float, boolean, datetime, array and table.

Example


  1. This is a TOML document.
title = "TOML Example"
server = "192.168.1.1"
ports =
connection_max = 5000
enabled = true
  1. Line breaks are okay when inside arrays
hosts =
# Indentation is allowed, but not required

ip = "10.0.0.1"
dc = "eqdc10"

ip = "10.0.0.2"
dc = "eqdc10"

Notable uses

TOML is used in a variety of settings such as:
  • Jekyll configuration _config.toml
  • Hugo configuration hugo.toml
  • Python 3 package manifests pyproject.toml
  • Rust package manifests Cargo.toml
  • Julia project settings Project.toml and package manifests Manifest.toml
  • Blender add-on manifests blender_manifest.toml
  • Gradle version catalogs libs.versions.toml
  • Taplo configurations .taplo.toml and taplo.toml
  • Prettier configurations .prettierrc.toml