Skip to content

Specify header name for from_config_file() function #585

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

Closed
aaalloc opened this issue Jun 23, 2023 · 3 comments · Fixed by #586
Closed

Specify header name for from_config_file() function #585

aaalloc opened this issue Jun 23, 2023 · 3 comments · Fixed by #586
Milestone

Comments

@aaalloc
Copy link
Contributor

aaalloc commented Jun 23, 2023

Proposal:
To be able to specify which header chose from a config file instead having by default "influx2"

Current behavior:
When loading a config file via from_config_file() it is impossible to specify which header we want to load and
load by default influx2 header

Desired behavior:
from_config_file(section="influx2", ...)

Use case:
To be able to load / switch config more easily

@bednar
Copy link
Contributor

bednar commented Jun 23, 2023

Hi @Siirko,

thanks for your suggestion 👍

Is this something you would be willing to help with? All PR is welcome and we will be happy to review your submission.

Regards

@aaalloc
Copy link
Contributor Author

aaalloc commented Jun 23, 2023

Hi @Siirko,

thanks for your suggestion 👍

Is this something you would be willing to help with? All PR is welcome and we will be happy to review your submission.

Regards

If I have times yes, but this is can be easily implemented on this file

value = str(config[key]) if is_json else config['influx2'][key]
where 'influx2' is a argument of _from_config_file() function

@aaalloc
Copy link
Contributor Author

aaalloc commented Jun 23, 2023

@bednar
Functionality added with test, tell me if I need to add more test ....

@bednar bednar added this to the 1.35.0 milestone Jun 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants