unitlab 2.1.9__tar.gz → 2.2.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: unitlab
3
- Version: 2.1.9
3
+ Version: 2.2.0
4
4
  Home-page: https://github.com/teamunitlab/unitlab-sdk
5
5
  Author: Unitlab Inc.
6
6
  Author-email: team@unitlab.ai
@@ -2,7 +2,7 @@ from setuptools import find_packages, setup
2
2
 
3
3
  setup(
4
4
  name="unitlab",
5
- version="2.1.9",
5
+ version="2.2.0",
6
6
  license="MIT",
7
7
  author="Unitlab Inc.",
8
8
  author_email="team@unitlab.ai",
@@ -11,7 +11,7 @@ import tqdm
11
11
 
12
12
  from . import exceptions
13
13
  from .dataset import DatasetUploadHandler
14
- from .utils import handle_exceptions
14
+ from .utils import get_api_url, handle_exceptions
15
15
 
16
16
  logger = logging.getLogger(__name__)
17
17
 
@@ -49,9 +49,9 @@ class UnitlabClient:
49
49
  :exc:`~unitlab.exceptions.AuthenticationError`: If an invalid API key is used or (when not passing the API key directly) if ``UNITLAB_API_KEY`` is not found in your environment.
50
50
  """
51
51
 
52
- def __init__(self, api_key, api_url: str = "https://api.unitlab.ai"):
52
+ def __init__(self, api_key, api_url=None):
53
53
  self.api_key = api_key
54
- self.api_url = api_url
54
+ self.api_url = api_url or get_api_url()
55
55
  self.api_session = requests.Session()
56
56
  adapter = requests.adapters.HTTPAdapter(max_retries=3)
57
57
  self.api_session.mount("http://", adapter)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: unitlab
3
- Version: 2.1.9
3
+ Version: 2.2.0
4
4
  Home-page: https://github.com/teamunitlab/unitlab-sdk
5
5
  Author: Unitlab Inc.
6
6
  Author-email: team@unitlab.ai
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes