python-sdk-local 0.0.131__tar.gz → 0.0.132__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.
- {python_sdk_local-0.0.131 → python_sdk_local-0.0.132}/PKG-INFO +1 -1
- {python_sdk_local-0.0.131 → python_sdk_local-0.0.132}/python_sdk_local/src/mini_logger.py +7 -1
- {python_sdk_local-0.0.131 → python_sdk_local-0.0.132}/python_sdk_local/src/utilities.py +42 -1
- {python_sdk_local-0.0.131 → python_sdk_local-0.0.132}/python_sdk_local.egg-info/PKG-INFO +1 -1
- {python_sdk_local-0.0.131 → python_sdk_local-0.0.132}/setup.py +1 -1
- {python_sdk_local-0.0.131 → python_sdk_local-0.0.132}/README.md +0 -0
- {python_sdk_local-0.0.131 → python_sdk_local-0.0.132}/pyproject.toml +0 -0
- {python_sdk_local-0.0.131 → python_sdk_local-0.0.132}/python_sdk_local/src/__init__.py +0 -0
- {python_sdk_local-0.0.131 → python_sdk_local-0.0.132}/python_sdk_local/src/constants.py +0 -0
- {python_sdk_local-0.0.131 → python_sdk_local-0.0.132}/python_sdk_local/src/http_response.py +0 -0
- {python_sdk_local-0.0.131 → python_sdk_local-0.0.132}/python_sdk_local/src/item.py +0 -0
- {python_sdk_local-0.0.131 → python_sdk_local-0.0.132}/python_sdk_local/src/our_object.py +0 -0
- {python_sdk_local-0.0.131 → python_sdk_local-0.0.132}/python_sdk_local/src/unified_json.py +0 -0
- {python_sdk_local-0.0.131 → python_sdk_local-0.0.132}/python_sdk_local/src/valid_json_versions.py +0 -0
- {python_sdk_local-0.0.131 → python_sdk_local-0.0.132}/python_sdk_local/src/validate_environment.py +0 -0
- {python_sdk_local-0.0.131 → python_sdk_local-0.0.132}/python_sdk_local.egg-info/SOURCES.txt +0 -0
- {python_sdk_local-0.0.131 → python_sdk_local-0.0.132}/python_sdk_local.egg-info/dependency_links.txt +0 -0
- {python_sdk_local-0.0.131 → python_sdk_local-0.0.132}/python_sdk_local.egg-info/requires.txt +0 -0
- {python_sdk_local-0.0.131 → python_sdk_local-0.0.132}/python_sdk_local.egg-info/top_level.txt +0 -0
- {python_sdk_local-0.0.131 → python_sdk_local-0.0.132}/setup.cfg +0 -0
|
@@ -2,6 +2,8 @@ import logging
|
|
|
2
2
|
import os
|
|
3
3
|
import sys
|
|
4
4
|
|
|
5
|
+
import warnings
|
|
6
|
+
|
|
5
7
|
LOGGER_MINIMUM_SEVERITY = os.getenv("LOGGER_MINIMUM_SEVERITY", "INFO").upper()
|
|
6
8
|
# logging expects NOTSET/DEBUG/INFO/WARNING/ERROR/FATAL/CRITICAL
|
|
7
9
|
if LOGGER_MINIMUM_SEVERITY.isdigit():
|
|
@@ -25,7 +27,11 @@ logger = logging.getLogger(__name__)
|
|
|
25
27
|
|
|
26
28
|
class MiniLogger:
|
|
27
29
|
# TODO Can we so one generic function call by all
|
|
28
|
-
|
|
30
|
+
warnings.warn(
|
|
31
|
+
"deprecated_method is deprecated and will be removed in a future version. ",
|
|
32
|
+
DeprecationWarning,
|
|
33
|
+
stacklevel=2
|
|
34
|
+
)
|
|
29
35
|
@staticmethod
|
|
30
36
|
def start(message: str = "", object: dict = None):
|
|
31
37
|
"""
|
|
@@ -6,7 +6,7 @@ import re
|
|
|
6
6
|
from datetime import date, datetime, time, timedelta, timezone
|
|
7
7
|
from functools import lru_cache
|
|
8
8
|
from urllib.parse import urlparse
|
|
9
|
-
|
|
9
|
+
import warnings
|
|
10
10
|
import jwt
|
|
11
11
|
import requests
|
|
12
12
|
from dotenv import load_dotenv
|
|
@@ -14,6 +14,7 @@ from url_remote.environment_name_enum import EnvironmentName
|
|
|
14
14
|
|
|
15
15
|
from .mini_logger import MiniLogger as logger
|
|
16
16
|
|
|
17
|
+
|
|
17
18
|
load_dotenv()
|
|
18
19
|
# TODO Let's do brainstorming on this
|
|
19
20
|
# TODO Please add a comment here on those two lines
|
|
@@ -277,10 +278,20 @@ def is_datetime_in_datetime_range(check_datetime: datetime, datetime_range: (dat
|
|
|
277
278
|
|
|
278
279
|
|
|
279
280
|
def get_brand_name() -> str:
|
|
281
|
+
warnings.warn(
|
|
282
|
+
"deprecated_method is deprecated and will be removed in a future version. ",
|
|
283
|
+
DeprecationWarning,
|
|
284
|
+
stacklevel=2
|
|
285
|
+
)
|
|
280
286
|
return our_get_env("BRAND_NAME")
|
|
281
287
|
|
|
282
288
|
|
|
283
289
|
def get_environment_name() -> str:
|
|
290
|
+
warnings.warn(
|
|
291
|
+
"deprecated_method is deprecated and will be removed in a future version. ",
|
|
292
|
+
DeprecationWarning,
|
|
293
|
+
stacklevel=2
|
|
294
|
+
)
|
|
284
295
|
environment_name = our_get_env("ENVIRONMENT_NAME")
|
|
285
296
|
EnvironmentName(environment_name) # if invalid, raises ValueError: x is not a valid EnvironmentName
|
|
286
297
|
return environment_name
|
|
@@ -288,6 +299,11 @@ def get_environment_name() -> str:
|
|
|
288
299
|
|
|
289
300
|
def our_get_env(key: str, default: str = None, raise_if_not_found: bool = True,
|
|
290
301
|
raise_if_empty: bool = False) -> str:
|
|
302
|
+
warnings.warn(
|
|
303
|
+
"deprecated_method is deprecated and will be removed in a future version. ",
|
|
304
|
+
DeprecationWarning,
|
|
305
|
+
stacklevel=2
|
|
306
|
+
)
|
|
291
307
|
logger.start(object={"key": key, "default": default, "raise_if_not_found": raise_if_not_found,
|
|
292
308
|
"raise_if_empty": raise_if_empty})
|
|
293
309
|
env_var = os.getenv(key, default)
|
|
@@ -300,18 +316,38 @@ def our_get_env(key: str, default: str = None, raise_if_not_found: bool = True,
|
|
|
300
316
|
|
|
301
317
|
# TODO As only the database package uses those, let's move those three to the database package
|
|
302
318
|
def get_sql_hostname() -> str:
|
|
319
|
+
warnings.warn(
|
|
320
|
+
"deprecated_method is deprecated and will be removed in a future version. ",
|
|
321
|
+
DeprecationWarning,
|
|
322
|
+
stacklevel=2
|
|
323
|
+
)
|
|
303
324
|
return our_get_env("RDS_HOSTNAME")
|
|
304
325
|
|
|
305
326
|
|
|
306
327
|
def get_sql_username() -> str:
|
|
328
|
+
warnings.warn(
|
|
329
|
+
"deprecated_method is deprecated and will be removed in a future version. ",
|
|
330
|
+
DeprecationWarning,
|
|
331
|
+
stacklevel=2
|
|
332
|
+
)
|
|
307
333
|
return our_get_env("RDS_USERNAME")
|
|
308
334
|
|
|
309
335
|
|
|
310
336
|
def get_sql_password() -> str:
|
|
337
|
+
warnings.warn(
|
|
338
|
+
"deprecated_method is deprecated and will be removed in a future version. ",
|
|
339
|
+
DeprecationWarning,
|
|
340
|
+
stacklevel=2
|
|
341
|
+
)
|
|
311
342
|
return our_get_env("RDS_PASSWORD")
|
|
312
343
|
|
|
313
344
|
|
|
314
345
|
def get_dialog_jwt_secret_key() -> str:
|
|
346
|
+
warnings.warn(
|
|
347
|
+
"deprecated_method is deprecated and will be removed in a future version. ",
|
|
348
|
+
DeprecationWarning,
|
|
349
|
+
stacklevel=2
|
|
350
|
+
)
|
|
315
351
|
return our_get_env("DIALOG_JWT_SECRET_KEY", raise_if_empty=True)
|
|
316
352
|
|
|
317
353
|
|
|
@@ -332,6 +368,11 @@ def decode_jwt(token: str, key: str) -> dict:
|
|
|
332
368
|
|
|
333
369
|
|
|
334
370
|
def obfuscate_log_dict(log_dict: dict) -> dict:
|
|
371
|
+
warnings.warn(
|
|
372
|
+
"deprecated_method is deprecated and will be removed in a future version. ",
|
|
373
|
+
DeprecationWarning,
|
|
374
|
+
stacklevel=2
|
|
375
|
+
)
|
|
335
376
|
"""
|
|
336
377
|
Obfuscate keys:
|
|
337
378
|
- %password%
|
|
@@ -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.132', # https://pypi.org/project/python-sdk-local/
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python_sdk_local-0.0.131 → python_sdk_local-0.0.132}/python_sdk_local/src/valid_json_versions.py
RENAMED
|
File without changes
|
{python_sdk_local-0.0.131 → python_sdk_local-0.0.132}/python_sdk_local/src/validate_environment.py
RENAMED
|
File without changes
|
|
File without changes
|
{python_sdk_local-0.0.131 → python_sdk_local-0.0.132}/python_sdk_local.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
{python_sdk_local-0.0.131 → python_sdk_local-0.0.132}/python_sdk_local.egg-info/requires.txt
RENAMED
|
File without changes
|
{python_sdk_local-0.0.131 → python_sdk_local-0.0.132}/python_sdk_local.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|