INI
INI is a traditional configuration file format that groups settings with [section] headers and key=value pairs; it is simple but unstandardized, and implementations differ slightly.
Purpose
To provide the simplest configuration format for small sets of flat key-value settings that need no nesting.
Mechanism
It consists of sections ([section]) and key-value pairs (key=value), with comments marked by ; or #. No nested structures and no types (everything is a string). Windows .ini files and Python configparser are common implementations whose syntax details vary.
Use cases
- Windows configuration files
- Git .gitconfig
- Python configparser
- Legacy application configuration
Examples
- Input
[user] name = AdaOutputThe section {user:{name:"Ada"}}Everything is a string
Common errors
- Implementations differ in syntax (comment markers, case handling)
- Pin down the target implementation and consult its documentation
Related terms
TOML
TOML (Tom's Obvious, Minimal Language) is a configuration-oriented format representing data with tables and key-value pairs, with explicit semantics and no implicit type inference. GLOSSARY
YAML
YAML (YAML Ain't Markup Language) is a configuration-oriented data serialization format using indentation for hierarchy, supporting comments and references, and better suited to hand editing than JSON. GLOSSARY
Properties
Java Properties files use KEY=VALUE or KEY:VALUE format; they are the traditional configuration format of the Java ecosystem and support Unicode escapes. GLOSSARY
ENV
An ENV file defines environment variables in KEY=VALUE format for application configuration; it is the recommended approach of 12-factor apps. GLOSSARY