# Best way to create config files? / Does Julia support .toml natively?

**URL:** https://discourse.julialang.org/t/best-way-to-create-config-files-does-julia-support-toml-natively/21415
**Category:** General Usage
**Created:** [March 3, 2019, 4:01am UTC](https://discourse.julialang.org/t/best-way-to-create-config-files-does-julia-support-toml-natively/21415 "2019-03-03T04:01:12Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![danielc](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/danielc/32/220_2.png) [@danielc](https://discourse.julialang.org/u/danielc)
#### Post date: [March 3, 2019, 4:01am UTC](https://discourse.julialang.org/t/best-way-to-create-config-files-does-julia-support-toml-natively/21415/1 "2019-03-03T04:01:12Z")

</div>

Hello,

I want to write a program that reads a config file with straight forward key-value information. The sort of thing that you could do with a [TOML](https://github.com/toml-lang/toml) or [YAML](https://yaml.org/) file. I’m wondering if there is a “standard” solution in Julia? I had assumed that TOML would be supported natively because it’s used by the Julia package manager. But that doesn’t seem to be the case. I’ve only found [TOML.jl](https://github.com/wildart/TOML.jl) which doesn’t look quite like a polished product.

Anyway, I might just end up choosing between TOML.jl and [YAML.jl](https://github.com/BioJulia/YAML.jl). I just wanted to know if there was something obvious that I’ve missed.

Thanks for the help.

---

<div class="post-metadata">

### Author: ![rdeits](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rdeits/32/286_2.png) [@rdeits](https://discourse.julialang.org/u/rdeits)
#### Post date: [March 3, 2019, 4:17am UTC](https://discourse.julialang.org/t/best-way-to-create-config-files-does-julia-support-toml-natively/21415/2 "2019-03-03T04:17:33Z")

</div>

Nope, I think you haven’t missed anything obvious. The Julia package manager actually uses its own updated version of `TOML.jl` which lives inside the Pkg repository: [https://github.com/JuliaLang/Pkg.jl/tree/master/ext/TOML](https://github.com/JuliaLang/Pkg.jl/tree/master/ext/TOML) . You can access that internal TOML package via `using Pkg; Pkg.TOML`, but I wouldn’t necessarily recommend it for production code: I don’t think it’s guaranteed that `Pkg.TOML` will always be accessible or have a stable internal API in future versions of Pkg and Julia.

Fortunately, there is work underway right now to turn that internal `TOML` module into part of the Julia standard library: [transition Pkg.TOML to stdlib/TOML · Issue #1011 · JuliaLang/Pkg.jl · GitHub](https://github.com/JuliaLang/Pkg.jl/issues/1011) Once that’s done, you’ll be able to do `using TOML` without having to install anything.

Until that time, you could use YAML.jl, or [JSON.jl](https://github.com/JuliaIO/JSON.jl), or you could use `Pkg.TOML` (as long as you’re willing to change your code when it becomes a standard library in the future).

---

<div class="post-metadata">

### Author: ![danielc](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/danielc/32/220_2.png) [@danielc](https://discourse.julialang.org/u/danielc)
#### Post date: [March 3, 2019, 4:23am UTC](https://discourse.julialang.org/t/best-way-to-create-config-files-does-julia-support-toml-natively/21415/3 "2019-03-03T04:23:18Z")

</div>

Exactly what I needed to know. Thanks!

---

<div class="post-metadata">

### Author: ![schnetter](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/schnetter/32/45_2.png) [@schnetter](https://discourse.julialang.org/u/schnetter)
#### Post date: [March 19, 2019, 2:54pm UTC](https://discourse.julialang.org/t/best-way-to-create-config-files-does-julia-support-toml-natively/21415/4 "2019-03-19T14:54:17Z")

</div>

The package [ConfParser.jl](https://github.com/JuliaIO/ConfParser.jl) seems quite convenient and well-maintained.

-erik

---

<div class="post-metadata">

### Author: ![ExpandingMan](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/expandingman/32/866_2.png) [@ExpandingMan](https://discourse.julialang.org/u/ExpandingMan)
#### Post date: [March 19, 2019, 2:57pm UTC](https://discourse.julialang.org/t/best-way-to-create-config-files-does-julia-support-toml-natively/21415/5 "2019-03-19T14:57:14Z")

</div>

It would be really nice if we can get TOML split off into a separate package so that it’s easier to use and maintain. I strongly prefer it to YAML, which is a bit of a mess in my opinion.

---

<div class="post-metadata">

### Author: ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)
#### Post date: [March 20, 2019, 8:27am UTC](https://discourse.julialang.org/t/best-way-to-create-config-files-does-julia-support-toml-natively/21415/6 "2019-03-20T08:27:29Z")

</div>

It is WIP, see

[https://github.com/JuliaLang/Pkg.jl/issues/1011](https://github.com/JuliaLang/Pkg.jl/issues/1011)

I plan to contribute in the medium run.
