Learn TOML in 10 Minutes (Tutorial)

2024 ж. 13 Мам.
21 418 Рет қаралды

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

Пікірлер
  • 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.

    @eksortso@eksortso8 ай бұрын
  • And I made a YAML tutorial for monday :)

    @Indently@Indently Жыл бұрын
  • Fascinating 🤩🤩

    @kunalsoni7681@kunalsoni76819 ай бұрын
  • Great tutorial.

    @mariocortes2670@mariocortes26708 ай бұрын
  • Thank you for this very interesting video!

    @higiniofuentes2551@higiniofuentes255111 ай бұрын
  • When it comes to parsing, is it faster than json?

    @principleshipcoleoid8095@principleshipcoleoid80958 ай бұрын
  • Awesome 👍

    @steelcock@steelcock Жыл бұрын
  • 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.

    @ccuny1@ccuny1 Жыл бұрын
    • If you want code prediction, you will need to install copilot as an add on :)

      @Indently@Indently Жыл бұрын
  • cool thank you!

    @dryoldcrabman6890@dryoldcrabman68909 ай бұрын
  • hi, would you tell me what's the theme of your ide

    @kdshare6765@kdshare6765 Жыл бұрын
  • Load the TOML then modify a value in it how do we do that effectively?

    @generalawareness101@generalawareness1019 ай бұрын
  • 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.

    @rishabhtomar7071@rishabhtomar70717 ай бұрын
  • It’s like ini format on steroids.

    @AWriterWandering@AWriterWandering Жыл бұрын
    • true

      @untakble@untakble Жыл бұрын
    • It's an ini file, structured as a good progammer would have done it 25 years ago.

      @bartvandenpoel8568@bartvandenpoel85683 ай бұрын
  • thanks really thorough guide now i wonder should i use toml instead of yamls

    @TheZazatv@TheZazatv10 ай бұрын
    • 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.

      @Indently@Indently10 ай бұрын
  • Is it possible to manipulate the toml file with python code?

    @Robbi9over@Robbi9over Жыл бұрын
    • Yeah, pretty much it converts dicts to TOML and you can do the same thing backwards.

      @Indently@Indently Жыл бұрын
  • But is this better than Yaml file?

    @higiniofuentes2551@higiniofuentes255111 ай бұрын
    • 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.

      @Indently@Indently11 ай бұрын
    • 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.

      @allokay3781@allokay37819 ай бұрын
  • 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.

    @allokay3781@allokay37819 ай бұрын
  • function annotations are so useless

    @iincognito96@iincognito969 ай бұрын
KZhead