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

feat: allow to use client's optional configs for initialization from file or environment properties #510

Merged
merged 2 commits into from
Oct 12, 2022

Conversation

bednar
Copy link
Contributor

@bednar bednar commented Oct 5, 2022

Closes #506

Proposed Changes

This PR makes it possible for users to configure the client in this way:

InfluxDBClient.from_config_file(retries=WritesRetry(total=3, retry_interval=1, exponential_base=2))

Checklist

  • CHANGELOG.md updated
  • Rebased/mergeable
  • A test has been added if appropriate
  • pytest tests completes successfully
  • Commit messages are conventional
  • Sign CLA (if not already signed)

@codecov-commenter
Copy link

codecov-commenter commented Oct 5, 2022

Codecov Report

Base: 90.11% // Head: 90.11% // No change to project coverage 👍

Coverage data is based on head (2311660) compared to base (50f021e).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #510   +/-   ##
=======================================
  Coverage   90.11%   90.11%           
=======================================
  Files          39       39           
  Lines        3380     3380           
=======================================
  Hits         3046     3046           
  Misses        334      334           
Impacted Files Coverage Δ
influxdb_client/client/_base.py 97.35% <100.00%> (ø)
influxdb_client/client/influxdb_client.py 98.73% <100.00%> (ø)
influxdb_client/client/influxdb_client_async.py 87.93% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@bednar bednar changed the title feat: allow to use client's optional configs for initialization from config file or environment properties feat: allow to use client's optional configs for initialization from file or environment properties Oct 5, 2022
@bednar bednar requested a review from powersj October 5, 2022 08:46
@bednar bednar marked this pull request as ready for review October 5, 2022 08:46
@bednar bednar self-assigned this Oct 6, 2022
Copy link
Contributor

@powersj powersj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you!

@bednar bednar merged commit 42432f9 into master Oct 12, 2022
@bednar bednar deleted the config_env_kwargs branch October 12, 2022 01:48
@bednar bednar added this to the 1.34.0 milestone Oct 12, 2022
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 this pull request may close these issues.

Allow configuring retries with from_config_file
3 participants