Questions tagged [toml]

TOML is a language designed for configuring software

TOML stands for Tom’s Obvious, Minimal Language. It is a language designed for configuring software.

From its repository:

TOML aims to be a minimal configuration file format that's easy to read due to obvious semantics. TOML is designed to map unambiguously to a hash table. TOML should be easy to parse into data structures in a wide variety of languages.

Resources

238 questions
69
votes
3 answers

TOML vs YAML vs StrictYAML

TOML said "TOML and YAML both emphasize human readability features, like comments that make it easier to understand the purpose of a given line. TOML differs in combining these, allowing comments (unlike JSON) but preserving simplicity (unlike…
Qiulang
  • 10,295
  • 11
  • 80
  • 129
17
votes
1 answer

How to pull a dependency with different features under Cargo.toml "dependencies" and "dev-dependencies"?

Suppose you have a dependency called "dep" which has two features called f1 and f2. I want to use "dep" with the f1 feature when I'm building my crate normally, but use it with f2 when building it for tests. I know dev-dependencies are those we need…
Alex Sed
  • 700
  • 5
  • 12
16
votes
4 answers

poetry install | SolverProblemError Because my_project depends on string (*) which doesn't match any versions, version solving failed

I am yet to use poetry to run project, so excuse lack of understanding. I successfully installed the poetry python library manager, using: curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python3 Next step…
user16341274
16
votes
2 answers

Does TOML support nested arrays of objects/tables?

I want to generate JSON from TOML files. The JSON structure should be something like this, with arrays of objects within arrays of objects: { "things": [ { "a": "thing1", "b": "fdsa", "multiline":…
R891
  • 2,550
  • 4
  • 18
  • 30
12
votes
2 answers

How to run a Julia project?

Julia is not in my wheelhouse yet, but I have been handed a Julia project to run the code within. This consists of a directory containing a main.jl, a Project.toml and a Manifest.toml. I've read up a little on what the TOML files are for; to…
Toby
  • 9,696
  • 16
  • 68
  • 132
12
votes
2 answers

Hugo Posts not displaying

Using Hugo Quickstart, I was able to up and running set up a blog and even wrote a post. When I run either hugo server -D or hugo server -D --watch --verbose I can see my post on localhost. But when I run only hugo server my blog loads only the…
andy
  • 1,947
  • 5
  • 27
  • 46
11
votes
2 answers

How to define a map in TOML?

How to define a map in TOML? For example, I want to define something like: [FOO] Usernames_Passwords='{"user1":"pass1","user2":"pass2"}' and then in go convert them to a map[string]string
Said Saifi
  • 1,995
  • 7
  • 26
  • 45
10
votes
1 answer

Deserializing TOML into vector of enum with values

I'm trying to read a TOML file to create a struct that contains a vector of enums with associated values. Here's the sample code: extern crate serde; #[macro_use] extern crate serde_derive; extern crate toml; use std::fs::File; use…
Dash83
  • 1,357
  • 2
  • 17
  • 31
9
votes
6 answers

(Go) How to use toml files?

As title, I want to know how to use toml files from golang. Before that, I show my toml examples. Is it right? [datatitle] enable = true userids = [ "12345", "67890" ] [datatitle.12345] prop1 = 30 prop2 = 10 [datatitle.67890] …
Harry
  • 1,257
  • 3
  • 14
  • 25
8
votes
1 answer

Pip pyproject.toml: Can optional dependency groups require other optional dependency groups?

I am using the latest version of pip, 23.01. I have a pyproject.toml file with dependencies and optional dependency groups (aka "extras"). To avoid redundancies and make managing optional dependency groups easier, I would like to know how to have…
James
  • 93
  • 1
  • 4
8
votes
1 answer

Gradle Version Catalog specify library build type

I'm refactoring a multi module project with version catalogs and I have to add a dependency that is currently like this: implementation com.mygroup:my-artifact:1.0.0:debug@aar Since version catalogs doesn't allow to specify the aar type, a…
xatok
  • 905
  • 5
  • 20
8
votes
2 answers

Method to write python module output to toml file

I'm writing a scanner in python that will gather various information about a target such as open ports, version info and so on. Also using a toml file that holds configuration settings for individual scans. I need a method to store the scan results.…
pwnd_root
  • 81
  • 1
  • 2
8
votes
1 answer

How to "deserialize with" for a container using serde in Rust

MVCE: use std::collections::HashMap; use std::fmt; use std::marker::PhantomData; use std::str::FromStr; use serde; // 1.0.85 use serde::de::{self, MapAccess, Visitor}; // 1.0.85 use serde_derive::Deserialize; // 1.0.85 use toml; // 0.4.10 use…
Ross MacArthur
  • 4,735
  • 1
  • 24
  • 36
7
votes
1 answer

Cargo.toml: how do I select a dependency's feature based on my crate's features?

The scenario is the following: my crate has a dependency on num-bigint, and an optional dependency on rand: [dependencies] num-bigint = { version = "0.2" } rand = { version = "0.7", optional = true } When rand is disabled on my crate, everything's…
prosc
  • 327
  • 2
  • 5
6
votes
0 answers

Does TOML support top level arrays of dictionaries?

I am trying to write a configuration file that would be an array (list) or dictionaries (hashes, tables). In JSON terms that would be for instance [ { "a":1, "b":2 }, { "a":10, "b":20 } ] I was hoping that [[]] a…
WoJ
  • 27,165
  • 48
  • 180
  • 345
1
2 3
15 16