Learn TOML in 10 Minutes (Tutorial)
In this tutorial we're going to be learning what TOML is, and how it works. We will be using it in Python, but it works for practically any programming language you can think off.
TOML docs: toml.io/en/
▶ Become job-ready with Python:
www.indently.io
▶ Follow me on Instagram:
/ indentlyreels
00:00 What is TOML?
00:54 Creating a TOML file
02:03 Loading TOML
04:16 Learning TOML
09:28 Timestamps
10:30 Conclusion
Пікірлер: 27
This is a pretty good introduction to TOML. But I need to point out that single and double quotes in TOML work differently. Single quotes are used to write literal strings, which work like a strict version of Python's raw strings. Good for things like Windows paths. For that reason, you don't need to be consistent. Use what is best for your text.
And I made a YAML tutorial for monday :)
Thank you for this very interesting video!
The explanation is as clear as TOML syntax.
Fascinating 🤩🤩
Great tutorial.
Awesome 👍
Load the TOML then modify a value in it how do we do that effectively?
cool thank you!
When it comes to parsing, is it faster than json?
Thank you Frederico.I am using the latest version of VSC but not getting the the autocomplete/Intellisense or what you call the Copilot code completion. I did install the Intellisense (PyLance) extension recommended inside VSC, but I gloss over it as if it has been talked about elsewhere?do not get the same level of autocomplete and zero autocompletion inside the toml file. I suspect I need to "install" Copilot. Did I miss a video on that, as you seem to glass over it here, indicating maybe that is has been covered elsewhere? Anyway, great tut so thank you once again.
@Indently
Жыл бұрын
If you want code prediction, you will need to install copilot as an add on :)
hi, would you tell me what's the theme of your ide
It’s like ini format on steroids.
@untakble
Жыл бұрын
true
@bartvandenpoel8568
6 ай бұрын
It's an ini file, structured as a good progammer would have done it 25 years ago.
Its great to use toml but can't i just use normal json files and import those directly as dict. If there is no functional difference, logically with respect to python both are exactly same. I believe it is a matter of personal choise here.
how do you do that '->'?
What is tomorrow used for
Is it possible to manipulate the toml file with python code?
@Indently
Жыл бұрын
Yeah, pretty much it converts dicts to TOML and you can do the same thing backwards.
thanks really thorough guide now i wonder should i use toml instead of yamls
@Indently
Жыл бұрын
I personally enjoyed TOML more, but I don't know if TOML is lacking in anything compared to YAML since I've used neither of them in big projects.
But is this better than Yaml file?
@Indently
Жыл бұрын
Don't really know how companies decide, but I prefer TOML for I found it FAAARR more simple. To the point that I could make this video in 10 minutes vs the YAML video in 17.
@allokay3781
Жыл бұрын
Yaml is easier to read, but far more complex. I would use TOML and split it into multiple files, so it's easier to read.
YAML fans say YAML is much easier to read than TOML. In this case I can give you these simple tips: 1. Indend the text in TOML This will improve readability a lot. 2. Split TOML into multiple files. If you do this readability in TOML is far better than before and not that much behind YAML anymore. In case of indending text you have even more possibilities as with YAML.