lukhed-basic-utils 1.4.6__tar.gz → 1.4.7__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.
- {lukhed_basic_utils-1.4.6 → lukhed_basic_utils-1.4.7}/PKG-INFO +1 -1
- {lukhed_basic_utils-1.4.6 → lukhed_basic_utils-1.4.7}/lukhed_basic_utils/githubCommon.py +33 -5
- {lukhed_basic_utils-1.4.6 → lukhed_basic_utils-1.4.7}/lukhed_basic_utils.egg-info/PKG-INFO +1 -1
- {lukhed_basic_utils-1.4.6 → lukhed_basic_utils-1.4.7}/setup.py +1 -1
- {lukhed_basic_utils-1.4.6 → lukhed_basic_utils-1.4.7}/LICENSE +0 -0
- {lukhed_basic_utils-1.4.6 → lukhed_basic_utils-1.4.7}/README.md +0 -0
- {lukhed_basic_utils-1.4.6 → lukhed_basic_utils-1.4.7}/lukhed_basic_utils/__init__.py +0 -0
- {lukhed_basic_utils-1.4.6 → lukhed_basic_utils-1.4.7}/lukhed_basic_utils/chartJsCommon.py +0 -0
- {lukhed_basic_utils-1.4.6 → lukhed_basic_utils-1.4.7}/lukhed_basic_utils/classCommon.py +0 -0
- {lukhed_basic_utils-1.4.6 → lukhed_basic_utils-1.4.7}/lukhed_basic_utils/fileCommon.py +0 -0
- {lukhed_basic_utils-1.4.6 → lukhed_basic_utils-1.4.7}/lukhed_basic_utils/listWorkCommon.py +0 -0
- {lukhed_basic_utils-1.4.6 → lukhed_basic_utils-1.4.7}/lukhed_basic_utils/mathCommon.py +0 -0
- {lukhed_basic_utils-1.4.6 → lukhed_basic_utils-1.4.7}/lukhed_basic_utils/osCommon.py +0 -0
- {lukhed_basic_utils-1.4.6 → lukhed_basic_utils-1.4.7}/lukhed_basic_utils/requestsCommon.py +0 -0
- {lukhed_basic_utils-1.4.6 → lukhed_basic_utils-1.4.7}/lukhed_basic_utils/stringCommon.py +0 -0
- {lukhed_basic_utils-1.4.6 → lukhed_basic_utils-1.4.7}/lukhed_basic_utils/timeCommon.py +0 -0
- {lukhed_basic_utils-1.4.6 → lukhed_basic_utils-1.4.7}/lukhed_basic_utils.egg-info/SOURCES.txt +0 -0
- {lukhed_basic_utils-1.4.6 → lukhed_basic_utils-1.4.7}/lukhed_basic_utils.egg-info/dependency_links.txt +0 -0
- {lukhed_basic_utils-1.4.6 → lukhed_basic_utils-1.4.7}/lukhed_basic_utils.egg-info/requires.txt +0 -0
- {lukhed_basic_utils-1.4.6 → lukhed_basic_utils-1.4.7}/lukhed_basic_utils.egg-info/top_level.txt +0 -0
- {lukhed_basic_utils-1.4.6 → lukhed_basic_utils-1.4.7}/setup.cfg +0 -0
- {lukhed_basic_utils-1.4.6 → lukhed_basic_utils-1.4.7}/tests/test_osCommon.py +0 -0
- {lukhed_basic_utils-1.4.6 → lukhed_basic_utils-1.4.7}/tests/test_timeCommon.py +0 -0
|
@@ -537,10 +537,7 @@ class GithubHelper:
|
|
|
537
537
|
print(f"Failed to download repository. HTTP status code: {response.status_code}")
|
|
538
538
|
return None
|
|
539
539
|
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
540
|
+
|
|
544
541
|
class KeyManager(GithubHelper):
|
|
545
542
|
def __init__(self, key_name, config_file_preference='local', github_config_dir=None, provide_key_data=None,
|
|
546
543
|
force_setup=False):
|
|
@@ -750,4 +747,35 @@ class KeyManager(GithubHelper):
|
|
|
750
747
|
if updated:
|
|
751
748
|
print("INFO: Key updated successfully")
|
|
752
749
|
|
|
753
|
-
|
|
750
|
+
|
|
751
|
+
def get_github_json(owner, repo, path, provide_full_url=None):
|
|
752
|
+
"""
|
|
753
|
+
Fetches a JSON file from a GitHub repository.
|
|
754
|
+
|
|
755
|
+
Parameters
|
|
756
|
+
----------
|
|
757
|
+
owner : str
|
|
758
|
+
The owner of the repository.
|
|
759
|
+
repo : str
|
|
760
|
+
The name of the repository.
|
|
761
|
+
path : str
|
|
762
|
+
The path to the JSON file in the repository.
|
|
763
|
+
provide_full_url : str, optional
|
|
764
|
+
If provided, will use this URL instead of constructing one from the owner, repo, and path.
|
|
765
|
+
Defaults to None.
|
|
766
|
+
|
|
767
|
+
Returns
|
|
768
|
+
-------
|
|
769
|
+
dict
|
|
770
|
+
The JSON data from the specified
|
|
771
|
+
"""
|
|
772
|
+
if provide_full_url:
|
|
773
|
+
url = provide_full_url
|
|
774
|
+
else:
|
|
775
|
+
# Construct raw content URL
|
|
776
|
+
url = f"https://raw.githubusercontent.com/{owner}/{repo}/main/{path}"
|
|
777
|
+
|
|
778
|
+
# Send GET request
|
|
779
|
+
response = rC.request_json(url)
|
|
780
|
+
|
|
781
|
+
return response
|
|
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
|
|
|
2
2
|
|
|
3
3
|
setup(
|
|
4
4
|
name="lukhed_basic_utils",
|
|
5
|
-
version="1.4.
|
|
5
|
+
version="1.4.7",
|
|
6
6
|
description="A collection of basic utility functions",
|
|
7
7
|
long_description=open("README.md").read(),
|
|
8
8
|
long_description_content_type="text/markdown",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{lukhed_basic_utils-1.4.6 → lukhed_basic_utils-1.4.7}/lukhed_basic_utils.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
{lukhed_basic_utils-1.4.6 → lukhed_basic_utils-1.4.7}/lukhed_basic_utils.egg-info/requires.txt
RENAMED
|
File without changes
|
{lukhed_basic_utils-1.4.6 → lukhed_basic_utils-1.4.7}/lukhed_basic_utils.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|