Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Add arbitrary section in config.toml #5849

Open
celek opened this issue Dec 27, 2024 · 0 comments
Open

[Feature] Add arbitrary section in config.toml #5849

celek opened this issue Dec 27, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@celek
Copy link

celek commented Dec 27, 2024

What problem or use case are you trying to solve?
Ability to create my own section : foo in config.toml, allowing me to access variable like this

config.extended.foo.var1
config.extended.foo.var2

Section will look like this

[foo]
var1 = val1
var2 = val2

Describe the UX of the solution you'd like
As a OH extender I am able to create my own personal section in the config.toml file
as a OH extener, I am able to retrieve the variable defined in my own section in config.toml

Do you have thoughts on the technical implementation?
Read the section name, create a new dict in config, read each var/val and add them to the dict

Describe alternatives you've considered
Using ENV variables work, I will still use ENV variable for secret values and not store them in config,toml

Additional context

possible code

elif not key.startswith('sandbox') and key.lower() != 'core':
(...)
extended_config = ExtendedConfig.add_dict(key, value)
cfg.extended.add(key, extended_config)
@celek celek added the enhancement New feature or request label Dec 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant