python-sdk-remote 0.0.92__tar.gz → 0.0.93__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.

Files changed (21) hide show
  1. {python_sdk_remote-0.0.92 → python_sdk_remote-0.0.93}/PKG-INFO +1 -1
  2. {python_sdk_remote-0.0.92 → python_sdk_remote-0.0.93}/README.md +4 -1
  3. {python_sdk_remote-0.0.92 → python_sdk_remote-0.0.93}/python_sdk_remote/src/constants.py +1 -1
  4. python_sdk_remote-0.0.93/python_sdk_remote/src/get_dependencies.py +58 -0
  5. {python_sdk_remote-0.0.92 → python_sdk_remote-0.0.93}/python_sdk_remote.egg-info/PKG-INFO +1 -1
  6. {python_sdk_remote-0.0.92 → python_sdk_remote-0.0.93}/python_sdk_remote.egg-info/SOURCES.txt +1 -0
  7. {python_sdk_remote-0.0.92 → python_sdk_remote-0.0.93}/setup.py +1 -1
  8. {python_sdk_remote-0.0.92 → python_sdk_remote-0.0.93}/pyproject.toml +0 -0
  9. {python_sdk_remote-0.0.92 → python_sdk_remote-0.0.93}/python_sdk_remote/src/__init__.py +0 -0
  10. {python_sdk_remote-0.0.92 → python_sdk_remote-0.0.93}/python_sdk_remote/src/http_response.py +0 -0
  11. {python_sdk_remote-0.0.92 → python_sdk_remote-0.0.93}/python_sdk_remote/src/item.py +0 -0
  12. {python_sdk_remote-0.0.92 → python_sdk_remote-0.0.93}/python_sdk_remote/src/mini_logger.py +0 -0
  13. {python_sdk_remote-0.0.92 → python_sdk_remote-0.0.93}/python_sdk_remote/src/our_object.py +0 -0
  14. {python_sdk_remote-0.0.92 → python_sdk_remote-0.0.93}/python_sdk_remote/src/unified_json.py +0 -0
  15. {python_sdk_remote-0.0.92 → python_sdk_remote-0.0.93}/python_sdk_remote/src/utilities.py +0 -0
  16. {python_sdk_remote-0.0.92 → python_sdk_remote-0.0.93}/python_sdk_remote/src/valid_json_versions.py +0 -0
  17. {python_sdk_remote-0.0.92 → python_sdk_remote-0.0.93}/python_sdk_remote/src/validate_environment.py +0 -0
  18. {python_sdk_remote-0.0.92 → python_sdk_remote-0.0.93}/python_sdk_remote.egg-info/dependency_links.txt +0 -0
  19. {python_sdk_remote-0.0.92 → python_sdk_remote-0.0.93}/python_sdk_remote.egg-info/requires.txt +0 -0
  20. {python_sdk_remote-0.0.92 → python_sdk_remote-0.0.93}/python_sdk_remote.egg-info/top_level.txt +0 -0
  21. {python_sdk_remote-0.0.92 → python_sdk_remote-0.0.93}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: python-sdk-remote
3
- Version: 0.0.92
3
+ Version: 0.0.93
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
@@ -1,4 +1,7 @@
1
- # python-package-backend-template
1
+ # python-sdk-package
2
+
3
+ https://github.com/grosser/repo_dependency_graph Ruby, Graph the dependencies of your repositories
4
+ https://github.com/thebjorn/pydeps Python
2
5
 
3
6
  To create local package and remote package layers (not to create GraphQL and REST-API layers)
4
7
 
@@ -3,7 +3,7 @@ import os
3
3
  from logger_local.LoggerComponentEnum import LoggerComponentEnum
4
4
 
5
5
  PYTHON_SDK_LOCAL_COMPONENT_ID = 184
6
- PYTHON_SDK_LOCAL_COMPONENT_NAME = 'python_sdk_local'
6
+ PYTHON_SDK_LOCAL_COMPONENT_NAME = 'python_sdk_remote'
7
7
 
8
8
  ENVIRONMENT_NAME = os.getenv("ENVIRONMENT_NAME")
9
9
  BRAND_NAME = os.getenv("BRAND_NAME")
@@ -0,0 +1,58 @@
1
+ # pip install BeautifulSoup4 requests importlib-metadata
2
+ import subprocess
3
+ import sys
4
+ import json
5
+ from collections import defaultdict
6
+
7
+ import importlib_metadata
8
+ import requests
9
+ from bs4 import BeautifulSoup
10
+
11
+
12
+ def install(packages):
13
+ print("Installing...", packages)
14
+ if isinstance(packages, str):
15
+ packages = [packages]
16
+ try:
17
+ subprocess.run([sys.executable, "-m", "pip", "install", "-U", "--no-deps"] + packages, check=False)
18
+ except Exception as e:
19
+ print(e)
20
+
21
+
22
+ def get_dependencies_per_package(include_packages):
23
+ dependencies_per_package = defaultdict(list)
24
+ for dist in importlib_metadata.distributions():
25
+ package_name = dist.metadata['Name']
26
+ if package_name not in include_packages:
27
+ continue
28
+
29
+ dependencies = dist.metadata.get_all('Requires-Dist', [])
30
+ for dependency in dependencies:
31
+ depend_on = dependency.split()[0]
32
+ if depend_on in include_packages:
33
+ dependencies_per_package[depend_on].append(package_name)
34
+
35
+ return dependencies_per_package
36
+
37
+
38
+ def get_included_packages():
39
+ url = "https://pypi.org/user/circles/"
40
+ class_name = "package-snippet__title"
41
+
42
+ response = requests.get(url)
43
+ soup = BeautifulSoup(response.text, "html.parser")
44
+ package_names = soup.find_all("h3", class_=class_name)
45
+ included_packages = [package_name.text for package_name in package_names]
46
+ install(included_packages)
47
+ return included_packages
48
+
49
+
50
+ def main():
51
+ include_packages = get_included_packages()
52
+ dependencies_per_package = get_dependencies_per_package(include_packages)
53
+ with open('dependencies.json', 'w') as f:
54
+ json.dump(dependencies_per_package, f, indent=4)
55
+
56
+
57
+ if __name__ == "__main__":
58
+ main()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: python-sdk-remote
3
- Version: 0.0.92
3
+ Version: 0.0.93
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
@@ -8,6 +8,7 @@ python_sdk_remote.egg-info/requires.txt
8
8
  python_sdk_remote.egg-info/top_level.txt
9
9
  python_sdk_remote/src/__init__.py
10
10
  python_sdk_remote/src/constants.py
11
+ python_sdk_remote/src/get_dependencies.py
11
12
  python_sdk_remote/src/http_response.py
12
13
  python_sdk_remote/src/item.py
13
14
  python_sdk_remote/src/mini_logger.py
@@ -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.92', # https://pypi.org/project/python-sdk-remote/
10
+ version='0.0.93', # https://pypi.org/project/python-sdk-remote/
11
11
  author="Circles",
12
12
  author_email="info@circles.life",
13
13
  description="PyPI Package for Circles Python SDK Local Python",