python-sdk-remote 0.0.149__tar.gz → 0.0.150__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.
Potentially problematic release.
This version of python-sdk-remote might be problematic. Click here for more details.
- {python_sdk_remote-0.0.149 → python_sdk_remote-0.0.150}/PKG-INFO +1 -1
- {python_sdk_remote-0.0.149 → python_sdk_remote-0.0.150}/python_sdk_remote/src/utilities.py +30 -13
- {python_sdk_remote-0.0.149 → python_sdk_remote-0.0.150}/python_sdk_remote.egg-info/PKG-INFO +1 -1
- {python_sdk_remote-0.0.149 → python_sdk_remote-0.0.150}/setup.py +1 -1
- {python_sdk_remote-0.0.149 → python_sdk_remote-0.0.150}/README.md +0 -0
- {python_sdk_remote-0.0.149 → python_sdk_remote-0.0.150}/pyproject.toml +0 -0
- {python_sdk_remote-0.0.149 → python_sdk_remote-0.0.150}/python_sdk_remote/src/__init__.py +0 -0
- {python_sdk_remote-0.0.149 → python_sdk_remote-0.0.150}/python_sdk_remote/src/constants.py +0 -0
- {python_sdk_remote-0.0.149 → python_sdk_remote-0.0.150}/python_sdk_remote/src/http_response.py +0 -0
- {python_sdk_remote-0.0.149 → python_sdk_remote-0.0.150}/python_sdk_remote/src/is_test_data.py +0 -0
- {python_sdk_remote-0.0.149 → python_sdk_remote-0.0.150}/python_sdk_remote/src/item.py +0 -0
- {python_sdk_remote-0.0.149 → python_sdk_remote-0.0.150}/python_sdk_remote/src/mini_logger.py +0 -0
- {python_sdk_remote-0.0.149 → python_sdk_remote-0.0.150}/python_sdk_remote/src/our_object.py +0 -0
- {python_sdk_remote-0.0.149 → python_sdk_remote-0.0.150}/python_sdk_remote/src/unified_json.py +0 -0
- {python_sdk_remote-0.0.149 → python_sdk_remote-0.0.150}/python_sdk_remote/src/valid_json_versions.py +0 -0
- {python_sdk_remote-0.0.149 → python_sdk_remote-0.0.150}/python_sdk_remote/src/validate_environment.py +0 -0
- {python_sdk_remote-0.0.149 → python_sdk_remote-0.0.150}/python_sdk_remote.egg-info/SOURCES.txt +0 -0
- {python_sdk_remote-0.0.149 → python_sdk_remote-0.0.150}/python_sdk_remote.egg-info/dependency_links.txt +0 -0
- {python_sdk_remote-0.0.149 → python_sdk_remote-0.0.150}/python_sdk_remote.egg-info/requires.txt +0 -0
- {python_sdk_remote-0.0.149 → python_sdk_remote-0.0.150}/python_sdk_remote.egg-info/top_level.txt +0 -0
- {python_sdk_remote-0.0.149 → python_sdk_remote-0.0.150}/setup.cfg +0 -0
|
@@ -279,6 +279,21 @@ def is_datetime_in_datetime_range(check_datetime: datetime, datetime_range: (dat
|
|
|
279
279
|
return is_datetime_in_datetime_range_result
|
|
280
280
|
|
|
281
281
|
|
|
282
|
+
# TODO add optional_prefix optional parameter. First check with optional_prefix, if not found, check without it.
|
|
283
|
+
def our_get_env(key: str, default: str = None, raise_if_not_found: bool = True,
|
|
284
|
+
raise_if_empty: bool = False) -> str:
|
|
285
|
+
logger.start(object={"key": key, "default": default,
|
|
286
|
+
"raise_if_not_found": raise_if_not_found,
|
|
287
|
+
"raise_if_empty": raise_if_empty})
|
|
288
|
+
env_var = os.getenv(key, default)
|
|
289
|
+
# TODO: "default is None" is always False
|
|
290
|
+
if ((raise_if_not_found and key not in os.environ and default is None)
|
|
291
|
+
or (raise_if_empty and not env_var and not default)):
|
|
292
|
+
raise Exception(f"Environment variable {key} not found - please check your .env file") # noqa: E501
|
|
293
|
+
logger.end(object={"env_var": env_var})
|
|
294
|
+
return env_var
|
|
295
|
+
|
|
296
|
+
|
|
282
297
|
def get_brand_name(raise_if_not_found: bool = True,
|
|
283
298
|
raise_if_empty: bool = False) -> str:
|
|
284
299
|
get_brand_name_result = our_get_env("BRAND_NAME",
|
|
@@ -296,19 +311,21 @@ def get_environment_name(raise_if_not_found: bool = True,
|
|
|
296
311
|
return environment_name
|
|
297
312
|
|
|
298
313
|
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
314
|
+
def get_product_user_identifier(raise_if_not_found: bool = True,
|
|
315
|
+
raise_if_empty: bool = False) -> str:
|
|
316
|
+
get_product_user_identifier_result = our_get_env("PRODUCT_USER_IDENTIFIER",
|
|
317
|
+
raise_if_not_found=raise_if_not_found, # noqa E501
|
|
318
|
+
raise_if_empty=raise_if_empty) # noqa E501
|
|
319
|
+
return get_product_user_identifier_result
|
|
320
|
+
|
|
321
|
+
|
|
322
|
+
def get_product_user_password(raise_if_not_found: bool = True,
|
|
323
|
+
raise_if_empty: bool = False) -> str:
|
|
324
|
+
# TODO Add support to PRODUCT_USER_PASSWORD and deprecation message for PRODUCT_PASSWORD (backward compatible)
|
|
325
|
+
get_product_user_password_result = our_get_env("PRODUCT_PASSWORD",
|
|
326
|
+
raise_if_not_found=raise_if_not_found, # noqa E501
|
|
327
|
+
raise_if_empty=raise_if_empty) # noqa E501
|
|
328
|
+
return get_product_user_password_result
|
|
312
329
|
|
|
313
330
|
|
|
314
331
|
# TODO As only the database package uses those, let's move those three to the database package # noqa: E501
|
|
@@ -7,7 +7,7 @@ package_dir = PACKAGE_NAME.replace("-", "_")
|
|
|
7
7
|
# python -m build needs pyproject.toml or setup.py
|
|
8
8
|
setuptools.setup(
|
|
9
9
|
name=PACKAGE_NAME,
|
|
10
|
-
version='0.0.
|
|
10
|
+
version='0.0.150', # https://pypi.org/project/python-sdk-remote/
|
|
11
11
|
author="Circles",
|
|
12
12
|
author_email="info@circlez.ai",
|
|
13
13
|
description="PyPI Package for Circles Python SDK Local Python",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python_sdk_remote-0.0.149 → python_sdk_remote-0.0.150}/python_sdk_remote/src/http_response.py
RENAMED
|
File without changes
|
{python_sdk_remote-0.0.149 → python_sdk_remote-0.0.150}/python_sdk_remote/src/is_test_data.py
RENAMED
|
File without changes
|
|
File without changes
|
{python_sdk_remote-0.0.149 → python_sdk_remote-0.0.150}/python_sdk_remote/src/mini_logger.py
RENAMED
|
File without changes
|
|
File without changes
|
{python_sdk_remote-0.0.149 → python_sdk_remote-0.0.150}/python_sdk_remote/src/unified_json.py
RENAMED
|
File without changes
|
{python_sdk_remote-0.0.149 → python_sdk_remote-0.0.150}/python_sdk_remote/src/valid_json_versions.py
RENAMED
|
File without changes
|
|
File without changes
|
{python_sdk_remote-0.0.149 → python_sdk_remote-0.0.150}/python_sdk_remote.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
{python_sdk_remote-0.0.149 → python_sdk_remote-0.0.150}/python_sdk_remote.egg-info/requires.txt
RENAMED
|
File without changes
|
{python_sdk_remote-0.0.149 → python_sdk_remote-0.0.150}/python_sdk_remote.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|