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: add possibility to initialize client by json file #467

Merged
merged 2 commits into from
Jul 23, 2022
Merged

Conversation

bednar
Copy link
Contributor

@bednar bednar commented Jul 20, 2022

Closes #444

Proposed Changes

Added possibility to initialize client by json file.

The format of the json file is same as is produced by influx config:

influx config --json
{
        "url": "http://localhost:8086",
        "token": "my-token",
        "org": "my-org",
        "active": true
}

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)

@bednar bednar marked this pull request as ready for review July 20, 2022 07:08
@bednar bednar requested a review from rhajek July 20, 2022 07:09
@codecov-commenter
Copy link

Codecov Report

Merging #467 (49ec9b6) into master (161e202) will increase coverage by 0.04%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #467      +/-   ##
==========================================
+ Coverage   89.45%   89.50%   +0.04%     
==========================================
  Files          38       38              
  Lines        3292     3306      +14     
==========================================
+ Hits         2945     2959      +14     
  Misses        347      347              
Impacted Files Coverage Δ
influxdb_client/client/influxdb_client.py 98.73% <ø> (ø)
influxdb_client/client/influxdb_client_async.py 91.37% <ø> (ø)
influxdb_client/client/_base.py 97.93% <100.00%> (+0.08%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 161e202...49ec9b6. Read the comment docs.

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.

Thanks for this!

@bednar bednar merged commit f02716a into master Jul 23, 2022
@bednar bednar deleted the init-json branch July 23, 2022 07:03
@bednar bednar added this to the 1.31.0 milestone Jul 23, 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.

Python access to InfluxDB parameters via JSON fie
3 participants