File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change 88import mimetypes
99import os
1010import time
11+ import sys
1112import urllib .parse
1213
1314from google .api_core import retry
4748_LABELBOX_API_KEY = "LABELBOX_API_KEY"
4849
4950
51+ def python_version_info ():
52+ version_info = sys .version_info
53+
54+ return f"{ version_info .major } .{ version_info .minor } .{ version_info .micro } -{ version_info .releaselevel } "
55+
56+
5057class Client :
5158 """ A Labelbox client.
5259
@@ -94,11 +101,13 @@ def __init__(self,
94101 self .app_url = app_url
95102 self .endpoint = endpoint
96103 self .rest_endpoint = rest_endpoint
104+
97105 self .headers = {
98106 'Accept' : 'application/json' ,
99107 'Content-Type' : 'application/json' ,
100108 'Authorization' : 'Bearer %s' % api_key ,
101- 'X-User-Agent' : f'python-sdk { SDK_VERSION } '
109+ 'X-User-Agent' : f"python-sdk { SDK_VERSION } " ,
110+ 'X-Python-Version' : f"{ python_version_info ()} " ,
102111 }
103112 self ._data_row_metadata_ontology = None
104113
You can’t perform that action at this time.
0 commit comments