Skip to content

Commit 87421a7

Browse files
Merge pull request #364 from algolia/ua/add-python-version
Add python version to the UserAgent
2 parents d9ed82c + c4e31e0 commit 87421a7

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

algoliasearch/client.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
import base64
2828
import random
2929
import sys
30+
from platform import python_version
3031

3132
try:
3233
from urllib import urlencode
@@ -65,7 +66,7 @@ def __init__(self, options):
6566
class Client(object):
6667
"""
6768
Entry point in the Python Client API.
68-
You should instanciate a Client object with your ApplicationID, ApiKey to
69+
You should instantiate a Client object with your ApplicationID, ApiKey to
6970
start using Algolia Search API.
7071
"""
7172

@@ -99,7 +100,7 @@ def __init__(self, app_id, api_key, hosts=None, _transport=None):
99100
'X-Algolia-Application-Id': app_id,
100101
'Content-Type': 'gzip',
101102
'Accept-Encoding': 'gzip',
102-
'User-Agent': 'Algolia for Python (%s)' % VERSION
103+
'User-Agent': 'Algolia for Python (%s); Python (%s)' % (VERSION, python_version()),
103104
}
104105

105106
self._app_id = app_id

0 commit comments

Comments
 (0)