File tree Expand file tree Collapse file tree 3 files changed +12
-3
lines changed Expand file tree Collapse file tree 3 files changed +12
-3
lines changed Original file line number Diff line number Diff line change 11name = "labelbox"
2+ __version__ = "2.4.10"
23
34from labelbox .client import Client
45from labelbox .schema .bulk_import_request import BulkImportRequest
1415from labelbox .schema .asset_metadata import AssetMetadata
1516from labelbox .schema .webhook import Webhook
1617from labelbox .schema .prediction import Prediction , PredictionModel
17- from labelbox .schema .ontology import Ontology
18+ from labelbox .schema .ontology import Ontology
Original file line number Diff line number Diff line change 1919from labelbox .schema .user import User
2020from labelbox .schema .organization import Organization
2121from labelbox .schema .labeling_frontend import LabelingFrontend
22+ from labelbox import __version__ as SDK_VERSION
2223
2324logger = logging .getLogger (__name__ )
2425
@@ -66,7 +67,8 @@ def __init__(self,
6667 self .headers = {
6768 'Accept' : 'application/json' ,
6869 'Content-Type' : 'application/json' ,
69- 'Authorization' : 'Bearer %s' % api_key
70+ 'Authorization' : 'Bearer %s' % api_key ,
71+ 'X-User-Agent' : f'python-sdk { SDK_VERSION } '
7072 }
7173
7274 @retry .Retry (predicate = retry .if_exception_type (
Original file line number Diff line number Diff line change 11import setuptools
22
3+ with open ('labelbox/__init__.py' ) as fid :
4+ for line in fid :
5+ if line .startswith ('__version__' ):
6+ SDK_VERSION = line .strip ().split ()[- 1 ][1 :- 1 ]
7+ break
8+
39with open ("README.md" , "r" ) as fh :
410 long_description = fh .read ()
511
612setuptools .setup (
713 name = "labelbox" ,
8- version = "2.4.9" ,
14+ version = SDK_VERSION ,
915 author = "Labelbox" ,
1016 author_email = "engineering@labelbox.com" ,
1117 description = "Labelbox Python API" ,
You can’t perform that action at this time.
0 commit comments