dini 2.0.0-rc

INI-like format parser written in D.

To use this package, run the following command in your project's root directory:

Manual usage
Put the following dependency into your project's dependences section:


Version Downloads Maintained

dini is a library written in D Programming Language that allows you to read and write INI configuration files with ease.


  • Easy to use

    Documentation and examples helps you understand library. It's also very nice to use :).

  • Well documented

    The code is well documented. If you find something that isn't, be sure to open issue about it.

  • Variable lookups

    You can "paste" defined variables values in values using %variable%

  • Section inheriting

    Sections can inherit values from other sections

  • Configurable

    Since version 2

    You can define custom quotes, comments and use custom type to store values (reader only).

    Also, if you want to create custom data from INI, you can use INIReader to construct one.

NOTE: Current development version - 2.0.0 is backwards API compatible, if you have any compatibility issues, please report them.

Quick start


Stable version

    "dependencies": {
        "dini": "~> 1.0.1"

Latest version

    "dependencies": {
        "dini": "~> 2.0.0-rc"


Let's check how it works in real life. In the examples, we'll use following configuration file:


[foo : def]
name1=Name1 from foo. Lookup for def.name2: %name2%

Now, lets try to parse it, we can do it with using code similar to:

import std.stdio;
import dini;

void main()
    // Parse file
    auto ini = Ini.Parse("path/to/file.conf");
    // Print foo.name1 value

You can also set INI variables before parsing:

import std.stdio, std.path;
import dini;

void main()
    // Create ini struct instance
    Ini ini;
    // Set key value
    ini.setKey("currentdir", getcwd());
    // Now, you can use currentdir in ini file
    // Print foo.name1 value

This allows for using %currentdir% in configuration file now.

Global Inheriting

If you would like to inherit sections that are in another one, you can use . at the beggining to start from global scope:


; Note the dot at beggining
[b.c : .a.b]
Global lookups

The same goes for variable lookups:


2.0.0 2016-Oct-02
2.0.0-rc 2016-Aug-08
1.0.1 2016-Mar-05
1.0.0 2014-Nov-15
~master 2016-Oct-02
Show all 5 versions
Download Stats:
  • 0 downloads today

  • 0 downloads this week

  • 6 downloads this month

  • 5074 downloads total

Short URL: