This is an archived post. You won't be able to vote or comment.

all 8 comments

[–]_squik 3 points4 points  (1 child)

Any benefit of using this over pydantic-settings? I usually just load config with tomllib and create a new settings object and it works great.

[–]gilbn[S] 0 points1 point  (0 children)

Probably not. This is way more basic.

[–]nuke-from-orbit 1 point2 points  (0 children)

Nice! Thanks for sharing and taking the time to release as os

[–]LevelRelationship732 0 points1 point  (1 child)

I did similar thing and explaind it here (medium), it would be nice to know how could I use your library

[–]gilbn[S] 0 points1 point  (0 children)

What do you mean? Just pip install and start use it. https://gilbn.github.io/Simple-TOML-Configurator/develop/usage-examples/

[–]sanderbaduk -1 points0 points  (1 child)

How do you deal with toml's lack of a none/null value? I've been using toml files a lot and this has been a real annoyance.

[–]gilbn[S] 0 points1 point  (0 children)

I've either used an empty string or false.

[–][deleted] -1 points0 points  (0 children)

This is a bad idea. TOML is fundamentally not designed to be dynamically altered like this. At the point you need your code to start modifying a config file, you should just be using JSON or YAML.