Added header for driver version and other info#228
Conversation
Codecov Report
@@ Coverage Diff @@
## main #228 +/- ##
==========================================
- Coverage 98.52% 98.45% -0.08%
==========================================
Files 26 26
Lines 3801 3809 +8
==========================================
+ Hits 3745 3750 +5
- Misses 56 59 +3
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
You can simply do: I think it's safe to assume that when we are executing the python-arango code, the version file would've already been generated by |
@joowani , thanks for the tip. I tested it and it works! |
There was a problem hiding this comment.
Looks like you missed a couple of spots but the rest looks good! Please feel free to merge after you address the nits. Thanks as always.
@joowani, please check the related issue for context information.
The aim here is to pass this header to every request. So, I've added it to normalize_headers() in request.py.
Please check request.py line 12. Is there a way to quickly retrieve the name and version of the current package in Python?
I am thinking of using the importlib-metadata package (https://pypi.org/project/importlib-metadata/). Do you think that this is a good approach or is there a better way?