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
6
votes
1 answer

How to create a TOML file from Rust?

I have collected all my data into a vector and I need to create a TOML file with that data. I have managed to create and open a file: let mut file = try!(File::create("servers.toml")); My vector<(string,(string, u32))> contains the following data,…
Rustic
  • 87
  • 1
  • 7
5
votes
2 answers

Does pip provide a TOML parser for python 3.9?

I want to parse TOML files in python 3.9, and I am wondering if I can do so without installing another package. Since pip knows how to work with pyproject.toml files, and I already have pip installed, does pip provide a parser that I can import and…
Arthur Hebert-Ryan
  • 1,802
  • 18
  • 24
5
votes
0 answers

Failed to parse manifest - Virtual manifests must be configured with [workspace]

So I'm running this in powershell for my Rust project: cargo build --target thumbv7em-none-eabihf And it produces this error after I try to execute this command: error: failed to parse manifest at C:\Users\PC\Downloads\Blizzard\Cargo.toml Caused by:…
1BL1ZZARD
  • 225
  • 2
  • 14
5
votes
0 answers

How to set tool.poetry.source as environment variable

I'm using Poetry with a private repo and need to know if there is a way to set the following config in pyproject.toml as env variable. The Poetry documentation says something like export POETRY_TOOL_POETRY_SOURCE_NAME=repo should work but I had no…
Amin
  • 763
  • 7
  • 22
5
votes
1 answer

Using serde to deserialize a HashMap with a Enum key

I have the following Rust code which models a configuration file which includes a HashMap keyed with an enum. use std::collections::HashMap; use serde::{Deserialize, Serialize}; #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq,…
Rudedog
  • 4,323
  • 1
  • 23
  • 34
5
votes
2 answers

How to specify the path to a dependency located in my home directory in Cargo.toml?

I want to use a local package which is located in my home directory. By default, Cargo searches for dependencies relative to Cargo.toml. If I know where my project is located relative to the home folder, I can do something like…
VladasZs
  • 87
  • 1
  • 11
5
votes
1 answer

How to edit and save TOML content in Python

I would like to edit a local TOML file and save it again to be used in the same Python script. In this sense, to be able to change a given parameter in loop. You can see an example of file,…
R2D2
  • 153
  • 2
  • 13
5
votes
1 answer

How to solve circular reference detected

I need to convert json into toml format. When I run the following code, it returns with an error. import toml toml_config = toml.dumps(data) where data is: {"general":{"log_level":{"value":"4","editable":"true","description":"debug=5, info=4,…
theashwanisingla
  • 412
  • 4
  • 13
5
votes
1 answer

Redirect missing translations on Hugo site

I have a Hugo site with a few translated pages. Not all the pages are translated, since I don't always have volunteers for every page in every language. In the menu, I have links to some pages that I'd like to redirect to English if the local…
Inductiveload
  • 6,094
  • 4
  • 29
  • 55
5
votes
6 answers

How to solve toml.decoder.TomlDecodeError: Key group not on a line by itself. (line 1 column 1 ...) error when calling streamlit package?

I just installed the streamlit package. When I try to run 'streamlit hello' I get the following error: (base) C:\>streamlit hello Traceback (most recent call last): File "c:\users\s158539\appdata\local\continuum\anaconda3\lib\runpy.py", line…
Jepetto
  • 51
  • 1
  • 1
  • 2
5
votes
1 answer

About toml line break in dependencies of Cargo.toml

I write dependencies of Cargo.toml : [dependencies ] opencv = {version = "0.26", default-features = false, features = ["opencv-41"]} Above one line can pass compilation. I want to seperate lines for dependencies. This page…
curlywei
  • 682
  • 10
  • 18
4
votes
0 answers

Dealing with `Options` and defaults when parsing in TOML structs with Rust+Serde

I have been working on configuration parsing code and wondered if you could help me to pick the best types for this code. I am trying to parse the following TOML: [default] a=10 b="abc" [section1] a = 78 [section2] b="xyz" The types of keys are…
i.petruk
  • 1,276
  • 1
  • 13
  • 18
4
votes
0 answers

include toml file from another toml

I am trying to include a second toml file from Cargo.toml file. I don't known how to do that and i don't known do this is possible. I am trying this: Cargo.toml: [package] name = "toml" authors = "TANDEX" version = "0.0.0" include =…
TANDEX
  • 131
  • 1
  • 6
4
votes
2 answers

pyinstaller Hidden import not found

I'm using pyinstaller. In my script there is: import toml config = toml.load('config.toml') I compiled my script with: pyinstaller main.py --onefile --clean --name myApp but when I run the executable it gave me: ModuleNotFoundError: No module…
xendi
  • 2,332
  • 5
  • 40
  • 64
4
votes
1 answer

How do I post some introductory paragraphs on the main page of my blogdown site?

My initial menu for my blogdown site is taken directly from the blogdown book. [[menu.main]] name = "Home" url = "/" weight = 1 [[menu.main]] name = "About" url = "/about/" weight = 2 [[menu.main]] name = "GitHub" url…
Display name
  • 4,153
  • 5
  • 27
  • 75
1
2
3
15 16