question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add a a way to specify descriptions and default values using dynaconf_validaors.toml

See original GitHub issue

Hi, thank you for the library. It really improved the way I approach configuration files. Finally I have types and proper sections. What I am missing is schema: I would love to be able to enforce that some parameters are obligatory, their type and provide a description, also raise an exception if there is some unknown parameter is configured. I think I could use something like marshmallow for that, but if it is part of this library, it would be great for my use-cases. What do you think?

UPD: after looking at the docs more, I think validators would solve majority of our use-cases, but I don’t see a way to specify descriptions and default values in a nice way, so that they are automatically populated in our docs.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:2
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
rochacbrunocommented, Sep 12, 2020

Now we can define default values using validators, the validators.toml is still missing this support

Details here: https://www.dynaconf.com/validation/#providing-default-or-computed-values

We still need

  • Define description/help for a setting value in the validator (or as a schema class)
  • Support description, default in toml validator
  • Add a way to generate initial settings file based on validator.
1reaction
rochacbrunocommented, Jan 22, 2019

thinking a bit more, in the same way we have .secrets. maybe we can add support for a special .defaults. file, so when it is present dynaconf loads it first.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Add a a way to specify descriptions and default values using ...
Hi, thank you for the library. It really improved the way I approach configuration files. Finally I have types and proper sections.
Read more >
Accessing parameters — dynaconf 2.2.3 documentation
Dynaconf offers different ways to access settings parameters. Assuming the following settings.toml file. [default] host = "server" port = 5555 auth ...
Read more >
Configuration - Dynaconf - 3.1.11
When environments is set, dynaconf will use this value as the environment holding the default values, ex: in a toml file it will...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found