python-sdk-remote 0.0.120__tar.gz → 0.0.121__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.120 → python_sdk_remote-0.0.121}/PKG-INFO +2 -1
- {python_sdk_remote-0.0.120 → python_sdk_remote-0.0.121}/python_sdk_remote/src/utilities.py +15 -15
- {python_sdk_remote-0.0.120 → python_sdk_remote-0.0.121}/python_sdk_remote.egg-info/PKG-INFO +2 -1
- {python_sdk_remote-0.0.120 → python_sdk_remote-0.0.121}/python_sdk_remote.egg-info/requires.txt +1 -0
- {python_sdk_remote-0.0.120 → python_sdk_remote-0.0.121}/setup.py +2 -2
- {python_sdk_remote-0.0.120 → python_sdk_remote-0.0.121}/README.md +0 -0
- {python_sdk_remote-0.0.120 → python_sdk_remote-0.0.121}/pyproject.toml +0 -0
- {python_sdk_remote-0.0.120 → python_sdk_remote-0.0.121}/python_sdk_remote/src/__init__.py +0 -0
- {python_sdk_remote-0.0.120 → python_sdk_remote-0.0.121}/python_sdk_remote/src/constants.py +0 -0
- {python_sdk_remote-0.0.120 → python_sdk_remote-0.0.121}/python_sdk_remote/src/http_response.py +0 -0
- {python_sdk_remote-0.0.120 → python_sdk_remote-0.0.121}/python_sdk_remote/src/item.py +0 -0
- {python_sdk_remote-0.0.120 → python_sdk_remote-0.0.121}/python_sdk_remote/src/mini_logger.py +0 -0
- {python_sdk_remote-0.0.120 → python_sdk_remote-0.0.121}/python_sdk_remote/src/our_object.py +0 -0
- {python_sdk_remote-0.0.120 → python_sdk_remote-0.0.121}/python_sdk_remote/src/unified_json.py +0 -0
- {python_sdk_remote-0.0.120 → python_sdk_remote-0.0.121}/python_sdk_remote/src/valid_json_versions.py +0 -0
- {python_sdk_remote-0.0.120 → python_sdk_remote-0.0.121}/python_sdk_remote/src/validate_environment.py +0 -0
- {python_sdk_remote-0.0.120 → python_sdk_remote-0.0.121}/python_sdk_remote.egg-info/SOURCES.txt +0 -0
- {python_sdk_remote-0.0.120 → python_sdk_remote-0.0.121}/python_sdk_remote.egg-info/dependency_links.txt +0 -0
- {python_sdk_remote-0.0.120 → python_sdk_remote-0.0.121}/python_sdk_remote.egg-info/top_level.txt +0 -0
- {python_sdk_remote-0.0.120 → python_sdk_remote-0.0.121}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: python-sdk-remote
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.121
|
|
4
4
|
Summary: PyPI Package for Circles Python SDK Local Python
|
|
5
5
|
Home-page: https://github.com/circles-zone/python-sdk-remote-python-package
|
|
6
6
|
Author: Circles
|
|
@@ -12,5 +12,6 @@ Description-Content-Type: text/markdown
|
|
|
12
12
|
Requires-Dist: requests
|
|
13
13
|
Requires-Dist: python-dotenv
|
|
14
14
|
Requires-Dist: url-remote
|
|
15
|
+
Requires-Dist: pyjwt
|
|
15
16
|
|
|
16
17
|
This is a package for sharing common functions used in different repositories
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import json
|
|
2
|
-
|
|
2
|
+
import jwt
|
|
3
3
|
import requests
|
|
4
4
|
import re
|
|
5
5
|
import os
|
|
@@ -317,20 +317,20 @@ def get_dialog_jwt_secret_key() -> str:
|
|
|
317
317
|
return our_get_env("DIALOG_JWT_SECRET_KEY", raise_if_empty=True)
|
|
318
318
|
|
|
319
319
|
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
320
|
+
def encode_jwt(payload: dict, key: str) -> str:
|
|
321
|
+
"""Example:
|
|
322
|
+
payload = {
|
|
323
|
+
"user_id": 123,
|
|
324
|
+
"username": "john_doe",
|
|
325
|
+
"exp": datetime.datetime.utcnow() + datetime.timedelta(hours=1)
|
|
326
|
+
}
|
|
327
|
+
"""
|
|
328
|
+
return jwt.encode(payload, key, algorithm='HS256')
|
|
329
|
+
|
|
330
|
+
|
|
331
|
+
def decode_jwt(token: str, key: str) -> dict:
|
|
332
|
+
"""key can be private / public"""
|
|
333
|
+
return jwt.decode(token, key, algorithms=['HS256'])
|
|
334
334
|
|
|
335
335
|
|
|
336
336
|
def obfuscate_log_dict(log_dict: dict) -> dict:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: python-sdk-remote
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.121
|
|
4
4
|
Summary: PyPI Package for Circles Python SDK Local Python
|
|
5
5
|
Home-page: https://github.com/circles-zone/python-sdk-remote-python-package
|
|
6
6
|
Author: Circles
|
|
@@ -12,5 +12,6 @@ Description-Content-Type: text/markdown
|
|
|
12
12
|
Requires-Dist: requests
|
|
13
13
|
Requires-Dist: python-dotenv
|
|
14
14
|
Requires-Dist: url-remote
|
|
15
|
+
Requires-Dist: pyjwt
|
|
15
16
|
|
|
16
17
|
This is a package for sharing common functions used in different repositories
|
|
@@ -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.121', # 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",
|
|
@@ -26,6 +26,6 @@ setuptools.setup(
|
|
|
26
26
|
"requests",
|
|
27
27
|
"python-dotenv",
|
|
28
28
|
"url-remote",
|
|
29
|
-
|
|
29
|
+
"pyjwt",
|
|
30
30
|
]
|
|
31
31
|
)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python_sdk_remote-0.0.120 → python_sdk_remote-0.0.121}/python_sdk_remote/src/http_response.py
RENAMED
|
File without changes
|
|
File without changes
|
{python_sdk_remote-0.0.120 → python_sdk_remote-0.0.121}/python_sdk_remote/src/mini_logger.py
RENAMED
|
File without changes
|
|
File without changes
|
{python_sdk_remote-0.0.120 → python_sdk_remote-0.0.121}/python_sdk_remote/src/unified_json.py
RENAMED
|
File without changes
|
{python_sdk_remote-0.0.120 → python_sdk_remote-0.0.121}/python_sdk_remote/src/valid_json_versions.py
RENAMED
|
File without changes
|
|
File without changes
|
{python_sdk_remote-0.0.120 → python_sdk_remote-0.0.121}/python_sdk_remote.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
{python_sdk_remote-0.0.120 → python_sdk_remote-0.0.121}/python_sdk_remote.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|