TOML

Last updated
TOML
TOML Logo.svg
Filename extension
.toml
Internet media type
application/toml
Developed by
Initial release23 February 2013;11 years ago (2013-02-23)
Latest release
1.0.0 [1]
12 January 2021;4 years ago (12 January 2021)
Type of formatData interchange
Open format?Yes
Website toml.io OOjs UI icon edit-ltr-progressive.svg

Tom's Obvious, Minimal Language (TOML, originally Tom's Own Markup Language [2] ) is a file format for configuration files. [3] It is intended to be easy to read and write due to obvious semantics which aim to be "minimal", and it is designed to map unambiguously to a dictionary. Originally created by Tom Preston-Werner, its specification is open source. TOML is used in a number of software projects [4] [5] [6] and is implemented in many programming languages. [7]

Contents

Syntax

TOML's syntax primarily consists of key = value pairs, [section names], and # (for comments). TOML's syntax somewhat resembles that of .INI files, but it includes a formal specification, whereas the INI file format suffers from many competing variants.

Its specification includes a list of supported data types: string, integer, float, boolean, datetime, array, and table.

Example

# This is a TOML document.title="ImpalaPay Co."[database]server="192.168.1.1"ports=[8000,8001,8002]connection_max=5000enabled=true# Line breaks are okay when inside arrayshosts=["alpha","omega"][servers]# Indentation (tabs and/or spaces) is allowed, but not required[servers.alpha]ip="10.0.0.1"dc="eqdc10"[servers.beta]ip="10.0.0.2"dc="eqdc10"

Use cases

TOML is used in a variety of settings (some related to its creator), such as:

Criticism

TOML has been criticized on a number of points: [11] [12]

See also

Related Research Articles

<span class="mw-page-title-main">Python (programming language)</span> General-purpose programming language

Python is a high-level, general-purpose programming language. Its design philosophy emphasizes code readability with the use of significant indentation.

<span class="mw-page-title-main">UTF-16</span> Variable-width encoding of Unicode, using one or two 16-bit code units

UTF-16 (16-bit Unicode Transformation Format) is a character encoding method capable of encoding all 1,112,064 valid code points of Unicode. The encoding is variable-length as code points are encoded with one or two 16-bitcode units. UTF-16 arose from an earlier obsolete fixed-width 16-bit encoding now known as UCS-2 (for 2-byte Universal Character Set), once it became clear that more than 216 (65,536) code points were needed, including most emoji and important CJK characters such as for personal and place names.

YAML is a human-readable data serialization language. It is commonly used for configuration files and in applications where data is being stored or transmitted. YAML targets many of the same communications applications as Extensible Markup Language (XML) but has a minimal syntax that intentionally differs from Standard Generalized Markup Language (SGML). It uses Python-style indentation to indicate nesting and does not require quotes around most string values.

<span class="mw-page-title-main">Configuration file</span> File holding settings for a computer program

In computing, configuration files are files used to configure the parameters and initial settings for some computer programs or applications, server processes and operating system settings.

The Web Server Gateway Interface is a simple calling convention for web servers to forward requests to web applications or frameworks written in the Python programming language. The current version of WSGI, version 1.0.1, is specified in Python Enhancement Proposal (PEP) 3333.

JSON is an open standard file format and data interchange format that uses human-readable text to store and transmit data objects consisting of name–value pairs and arrays. It is a commonly used data format with diverse uses in electronic data interchange, including that of web applications with servers.

<span class="mw-page-title-main">Twisted (software)</span> Event-driven network programming framework

Twisted is an event-driven network programming framework written in Python and licensed under the MIT License.

An INI file is a configuration file for computer software that consists of plain text with a structure and syntax comprising key–value pairs organized in sections. The name of these configuration files comes from the filename extension INI, short for initialization, used in the MS-DOS operating system which popularized this method of software configuration. The format has become an informal standard in many contexts of configuration, but many applications on other operating systems use different file name extensions, such as conf and cfg.

<span class="mw-page-title-main">Markdown</span> Plain text markup language

Markdown is a lightweight markup language for creating formatted text using a plain-text editor. John Gruber created Markdown in 2004 as an easy-to-read markup language. Markdown is widely used for blogging and instant messaging, and also used elsewhere in online forums, collaborative software, documentation pages, and readme files.

<span class="mw-page-title-main">PyCharm</span> Python programming integrated development environment

PyCharm is an integrated development environment (IDE) used for programming in Python. It provides code analysis, a graphical debugger, an integrated unit tester, integration with version control systems, and supports web development with Django. PyCharm is developed by the Czech company JetBrains and built on their IntelliJ platform.

Ansible is a suite of software tools that enables infrastructure as code. It is open-source and the suite includes software provisioning, configuration management, and application deployment functionality.

System Package Data Exchange is an open standard capable of representing systems with digital components as bills of materials (BOMs). First designed to describe software components, SPDX can describe the components of software systems, AI models, software builds, security data, and other data packages. SPDX allows the expression of components, licenses, copyrights, security references and other metadata relating to systems.

<span class="mw-page-title-main">Julia (programming language)</span> Dynamic programming language

Julia is a high-level, general-purpose dynamic programming language, designed to be fast and productive, for e.g. data science, artificial intelligence, machine learning, modeling and simulation, most commonly used for numerical analysis and computational science.

<span class="mw-page-title-main">Tom Preston-Werner</span> American software developer & entrepreneur

Thomas Preston-Werner is an American billionaire software developer and entrepreneur. He is an active contributor within the free and open-source software community, most prominently in the San Francisco Bay Area, where he lives.

<span class="mw-page-title-main">Jekyll (software)</span> Ruby-based static website generator

Jekyll is a static site generator written in Ruby by Tom Preston-Werner. It is distributed under the open source MIT license.

<span class="mw-page-title-main">Nim (programming language)</span> Programming language

Nim is a general-purpose, multi-paradigm, statically typed, compiled high-level system programming language, designed and developed by a team around Andreas Rumpf. Nim is designed to be "efficient, expressive, and elegant", supporting metaprogramming, functional, message passing, procedural, and object-oriented programming styles by providing several features such as compile time code generation, algebraic data types, a foreign function interface (FFI) with C, C++, Objective-C, and JavaScript, and supporting compiling to those same languages as intermediate representations.

Static site generators (SSGs) are software engines that use text input files to generate static web pages. Unlike dynamic websites, these static pages do not change based on the request. This simplifies the requirements for the backend and allows the site to be distributed via content delivery networks (CDN)s. The simple design also makes it harder for attackers to modify the website due to the smaller attack surface of these relatively simple backends. Some of the most popular static site generators are Jekyll, Hugo, Eleventy, Gatsby, and Next.js, SSGs are typically for rarely-changing, informative content, such as product pages, news articles, software documentation, and blogs.

Ballerina is an open source general-purpose programming language designed by WSO2 for cloud-era application programmers.

<span class="mw-page-title-main">ZPE Programming Environment</span> Scripting language

ZPE Programming Environment, formerly the Zenith Parsing Engine, is a general-purpose compiler, parser and runtime environment for the YASS programming language designed for educational use as well as for its general use. The language it interprets, YASS, is an interpreted, high-level, general-purpose programming language. YASS is largely built upon making the language easy to read and use, with optional support for syntaxes such as curly-bracket syntax. YASS supports dynamic typing or static typing, as well as strong typing and weak typing.

References

  1. "Release 1.0.0". 12 January 2021. Retrieved 17 January 2021.
  2. Preston-Werner, Tom (2013-02-24). "Initial commit · toml-lang/toml@84db252". GitHub . Archived from the original on 2024-06-15. Retrieved 2024-06-15.
  3. Preston-Werner, Tom; Gedam, Pradyun (January 11, 2021). "TOML: English v1.0.0". Archived from the original on January 29, 2024. Retrieved January 27, 2024.
  4. 1 2 "The Manifest Format - The Cargo Book". doc.rust-lang.org. Archived from the original on 2019-08-26. Retrieved 2023-07-08.
  5. DeVault, Drew (2021-07-28). "My wish-list for the next YAML". Archived from the original on 2024-03-09. Retrieved 2021-07-28. YAML is both universally used, and universally reviled. It has a lot of problems, but it also is so useful in solving specific tasks that it's hard to replace. Some new kids on the block (such as TOML) have successfully taken over a portion of its market share, but it remains in force in places where those alternatives show their weaknesses.
  6. "TOML: Tom's Obvious Minimal Language". toml.io. Archived from the original on 2022-08-08. Retrieved 2022-08-08.
  7. "toml-lang/toml". GitHub. 23 May 2022. Archived from the original on 15 February 2017. Retrieved 16 December 2016.
  8. "tomllib — Parse TOML files". Python documentation. Archived from the original on 2024-06-11. Retrieved 2023-07-08.
  9. "PEP 518 – Specifying Minimum Build System Requirements for Python Projects | peps.python.org". Python Enhancement Proposals (PEPs). Retrieved 2025-02-04.
  10. "10. Project.toml and Manifest.toml · Pkg.jl". pkgdocs.julialang.org. Archived from the original on 2023-07-08. Retrieved 2023-07-08.
  11. What is wrong with TOML?
  12. An INI critique of TOML