-
Notifications
You must be signed in to change notification settings - Fork 249
Set user agent header when making API requests #17
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
Conversation
Hmm. This worked locally but I guess putting the version in the Looks like there a ton of hacky ways to get around this.. not sure which one is least offensive. |
We also probably want to set |
Like this? 5aa9b3f |
Nope -- you can just do |
Ah I see. It's only |
6d37bff
to
1ff3570
Compare
This is ready for another look. |
As an aside We could move the other This pattern's rather nice, with https://github.com/pypa/warehouse/blob/64ca42e42d5613c8339b3ec5e1cb7765c6b23083/warehouse/__about__.py We'll also want to rename |
Signed-off-by: Zeke Sikelianos <zeke@sikelianos.com> make package version importable Signed-off-by: Zeke Sikelianos <zeke@sikelianos.com> get package version by reading and executing the version file Signed-off-by: Zeke Sikelianos <zeke@sikelianos.com> set __version__ Signed-off-by: Zeke Sikelianos <zeke@sikelianos.com> Update __init__.py Signed-off-by: Zeke Sikelianos <zeke@sikelianos.com> use __about__ Signed-off-by: Zeke Sikelianos <zeke@sikelianos.com>
Updated it to use |
Marvellous! |
The user agent for requests from this library are currently defaulting to something like
python-requests/2.27.1
. This PR updates the client to set a user agent header in the formreplicate-python@<version>
, so we can more easily identify where our API traffic is coming from.