blue-assistant 4.194.1__tar.gz → 4.226.1__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.
Files changed (82) hide show
  1. {blue_assistant-4.194.1/blue_assistant.egg-info → blue_assistant-4.226.1}/PKG-INFO +31 -3
  2. {blue_assistant-4.194.1 → blue_assistant-4.226.1}/README.md +30 -2
  3. blue_assistant-4.226.1/blue_assistant/.abcli/hue/create_user.sh +11 -0
  4. blue_assistant-4.226.1/blue_assistant/.abcli/hue/list.sh +11 -0
  5. {blue_assistant-4.194.1 → blue_assistant-4.226.1}/blue_assistant/.abcli/hue.sh +1 -1
  6. {blue_assistant-4.194.1 → blue_assistant-4.226.1}/blue_assistant/.abcli/tests/help.sh +3 -0
  7. {blue_assistant-4.194.1 → blue_assistant-4.226.1}/blue_assistant/README.py +2 -2
  8. {blue_assistant-4.194.1 → blue_assistant-4.226.1}/blue_assistant/__init__.py +1 -1
  9. {blue_assistant-4.194.1 → blue_assistant-4.226.1}/blue_assistant/config.env +3 -1
  10. {blue_assistant-4.194.1 → blue_assistant-4.226.1}/blue_assistant/env.py +4 -0
  11. blue_assistant-4.226.1/blue_assistant/help/hue.py +117 -0
  12. blue_assistant-4.226.1/blue_assistant/sample.env +1 -0
  13. blue_assistant-4.226.1/blue_assistant/script/repository/hue/__main__.py +108 -0
  14. blue_assistant-4.226.1/blue_assistant/script/repository/hue/api.py +186 -0
  15. blue_assistant-4.226.1/blue_assistant/script/repository/hue/colors.py +21 -0
  16. {blue_assistant-4.194.1 → blue_assistant-4.226.1/blue_assistant.egg-info}/PKG-INFO +31 -3
  17. {blue_assistant-4.194.1 → blue_assistant-4.226.1}/blue_assistant.egg-info/SOURCES.txt +4 -1
  18. blue_assistant-4.194.1/blue_assistant/help/hue.py +0 -36
  19. blue_assistant-4.194.1/blue_assistant/sample.env +0 -0
  20. blue_assistant-4.194.1/blue_assistant/script/repository/hue/__main__.py +0 -66
  21. blue_assistant-4.194.1/blue_assistant/script/repository/hue/functions.py +0 -53
  22. {blue_assistant-4.194.1 → blue_assistant-4.226.1}/LICENSE +0 -0
  23. {blue_assistant-4.194.1 → blue_assistant-4.226.1}/MANIFEST.in +0 -0
  24. {blue_assistant-4.194.1 → blue_assistant-4.226.1}/blue_assistant/.abcli/abcli.sh +0 -0
  25. {blue_assistant-4.194.1 → blue_assistant-4.226.1}/blue_assistant/.abcli/actions.sh +0 -0
  26. {blue_assistant-4.194.1 → blue_assistant-4.226.1}/blue_assistant/.abcli/alias.sh +0 -0
  27. {blue_assistant-4.194.1 → blue_assistant-4.226.1}/blue_assistant/.abcli/blue_assistant.sh +0 -0
  28. {blue_assistant-4.194.1 → blue_assistant-4.226.1}/blue_assistant/.abcli/browse.sh +0 -0
  29. {blue_assistant-4.194.1 → blue_assistant-4.226.1}/blue_assistant/.abcli/hue/set.sh +0 -0
  30. {blue_assistant-4.194.1 → blue_assistant-4.226.1}/blue_assistant/.abcli/script/list.sh +0 -0
  31. {blue_assistant-4.194.1 → blue_assistant-4.226.1}/blue_assistant/.abcli/script/run.sh +0 -0
  32. {blue_assistant-4.194.1 → blue_assistant-4.226.1}/blue_assistant/.abcli/script.sh +0 -0
  33. {blue_assistant-4.194.1 → blue_assistant-4.226.1}/blue_assistant/.abcli/tests/README.sh +0 -0
  34. {blue_assistant-4.194.1 → blue_assistant-4.226.1}/blue_assistant/.abcli/tests/script_list.sh +0 -0
  35. {blue_assistant-4.194.1 → blue_assistant-4.226.1}/blue_assistant/.abcli/tests/script_run.sh +0 -0
  36. {blue_assistant-4.194.1 → blue_assistant-4.226.1}/blue_assistant/.abcli/tests/version.sh +0 -0
  37. {blue_assistant-4.194.1 → blue_assistant-4.226.1}/blue_assistant/.abcli/tests/web_crawl.sh +0 -0
  38. {blue_assistant-4.194.1 → blue_assistant-4.226.1}/blue_assistant/.abcli/web/crawl.sh +0 -0
  39. {blue_assistant-4.194.1 → blue_assistant-4.226.1}/blue_assistant/.abcli/web.sh +0 -0
  40. {blue_assistant-4.194.1 → blue_assistant-4.226.1}/blue_assistant/__main__.py +0 -0
  41. {blue_assistant-4.194.1 → blue_assistant-4.226.1}/blue_assistant/functions.py +0 -0
  42. {blue_assistant-4.194.1 → blue_assistant-4.226.1}/blue_assistant/help/__init__.py +0 -0
  43. {blue_assistant-4.194.1 → blue_assistant-4.226.1}/blue_assistant/help/__main__.py +0 -0
  44. {blue_assistant-4.194.1 → blue_assistant-4.226.1}/blue_assistant/help/functions.py +0 -0
  45. {blue_assistant-4.194.1 → blue_assistant-4.226.1}/blue_assistant/help/script.py +0 -0
  46. {blue_assistant-4.194.1 → blue_assistant-4.226.1}/blue_assistant/help/web.py +0 -0
  47. {blue_assistant-4.194.1 → blue_assistant-4.226.1}/blue_assistant/host.py +0 -0
  48. {blue_assistant-4.194.1 → blue_assistant-4.226.1}/blue_assistant/logger.py +0 -0
  49. {blue_assistant-4.194.1 → blue_assistant-4.226.1}/blue_assistant/script/__init__.py +0 -0
  50. {blue_assistant-4.194.1 → blue_assistant-4.226.1}/blue_assistant/script/__main__.py +0 -0
  51. {blue_assistant-4.194.1 → blue_assistant-4.226.1}/blue_assistant/script/actions/__init__.py +0 -0
  52. {blue_assistant-4.194.1 → blue_assistant-4.226.1}/blue_assistant/script/actions/generate_image.py +0 -0
  53. {blue_assistant-4.194.1 → blue_assistant-4.226.1}/blue_assistant/script/actions/generate_text.py +0 -0
  54. {blue_assistant-4.194.1 → blue_assistant-4.226.1}/blue_assistant/script/actions/generic.py +0 -0
  55. {blue_assistant-4.194.1 → blue_assistant-4.226.1}/blue_assistant/script/load.py +0 -0
  56. {blue_assistant-4.194.1 → blue_assistant-4.226.1}/blue_assistant/script/repository/__init__.py +0 -0
  57. {blue_assistant-4.194.1 → blue_assistant-4.226.1}/blue_assistant/script/repository/base/__init__.py +0 -0
  58. {blue_assistant-4.194.1 → blue_assistant-4.226.1}/blue_assistant/script/repository/base/classes.py +0 -0
  59. {blue_assistant-4.194.1 → blue_assistant-4.226.1}/blue_assistant/script/repository/blue_amo/__init__.py +0 -0
  60. {blue_assistant-4.194.1 → blue_assistant-4.226.1}/blue_assistant/script/repository/blue_amo/actions/__init__.py +0 -0
  61. {blue_assistant-4.194.1 → blue_assistant-4.226.1}/blue_assistant/script/repository/blue_amo/actions/slicing_into_frames.py +0 -0
  62. {blue_assistant-4.194.1 → blue_assistant-4.226.1}/blue_assistant/script/repository/blue_amo/actions/stitching_the_frames.py +0 -0
  63. {blue_assistant-4.194.1 → blue_assistant-4.226.1}/blue_assistant/script/repository/blue_amo/classes.py +0 -0
  64. {blue_assistant-4.194.1 → blue_assistant-4.226.1}/blue_assistant/script/repository/generic/__init__.py +0 -0
  65. {blue_assistant-4.194.1 → blue_assistant-4.226.1}/blue_assistant/script/repository/generic/classes.py +0 -0
  66. {blue_assistant-4.194.1 → blue_assistant-4.226.1}/blue_assistant/script/repository/hue/__init__.py +0 -0
  67. {blue_assistant-4.194.1 → blue_assistant-4.226.1}/blue_assistant/script/repository/hue/classes.py +0 -0
  68. {blue_assistant-4.194.1 → blue_assistant-4.226.1}/blue_assistant/script/repository/orbital_data_explorer/__init__.py +0 -0
  69. {blue_assistant-4.194.1 → blue_assistant-4.226.1}/blue_assistant/script/repository/orbital_data_explorer/actions/__init__.py +0 -0
  70. {blue_assistant-4.194.1 → blue_assistant-4.226.1}/blue_assistant/script/repository/orbital_data_explorer/actions/researching_the_questions.py +0 -0
  71. {blue_assistant-4.194.1 → blue_assistant-4.226.1}/blue_assistant/script/repository/orbital_data_explorer/classes.py +0 -0
  72. {blue_assistant-4.194.1 → blue_assistant-4.226.1}/blue_assistant/urls.py +0 -0
  73. {blue_assistant-4.194.1 → blue_assistant-4.226.1}/blue_assistant/web/__init__.py +0 -0
  74. {blue_assistant-4.194.1 → blue_assistant-4.226.1}/blue_assistant/web/__main__.py +0 -0
  75. {blue_assistant-4.194.1 → blue_assistant-4.226.1}/blue_assistant/web/crawl.py +0 -0
  76. {blue_assistant-4.194.1 → blue_assistant-4.226.1}/blue_assistant.egg-info/dependency_links.txt +0 -0
  77. {blue_assistant-4.194.1 → blue_assistant-4.226.1}/blue_assistant.egg-info/requires.txt +0 -0
  78. {blue_assistant-4.194.1 → blue_assistant-4.226.1}/blue_assistant.egg-info/top_level.txt +0 -0
  79. {blue_assistant-4.194.1 → blue_assistant-4.226.1}/pyproject.toml +0 -0
  80. {blue_assistant-4.194.1 → blue_assistant-4.226.1}/requirements.txt +0 -0
  81. {blue_assistant-4.194.1 → blue_assistant-4.226.1}/setup.cfg +0 -0
  82. {blue_assistant-4.194.1 → blue_assistant-4.226.1}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: blue_assistant
3
- Version: 4.194.1
3
+ Version: 4.226.1
4
4
  Summary: 🧠 An AI Assistant.
5
5
  Home-page: https://github.com/kamangir/blue-assistant
6
6
  Author: Arash Abadpour (Kamangir)
@@ -62,6 +62,7 @@ graph LR
62
62
  url["🔗 url"]:::folder
63
63
  object["📂 object"]:::folder
64
64
 
65
+
65
66
  script --> assistant_script_list
66
67
 
67
68
  script --> assistant_script_run
@@ -71,12 +72,39 @@ graph LR
71
72
  url --> assistant_web_crawl
72
73
  assistant_web_crawl --> object
73
74
 
75
+
76
+ bridge_ip["🔗 bridge_ip"]:::folder
77
+ hue_username["🔗 hue_username"]:::folder
78
+ list_of_lights["💡 light IDs"]:::folder
79
+
80
+ hue_create_user["@hue<br>create_user"]
81
+ hue_list["@hue<br>list"]
82
+ hue_set["@hue<br>set"]
83
+ hue_test["@hue<br>test"]
84
+
85
+ bridge_ip --> hue_create_user
86
+ hue_create_user --> hue_username
87
+
88
+ bridge_ip --> hue_list
89
+ hue_username --> hue_list
90
+ hue_list --> list_of_lights
91
+
92
+ bridge_ip --> hue_set
93
+ hue_username --> hue_set
94
+ list_of_lights --> hue_set
95
+
96
+ bridge_ip --> hue_test
97
+ hue_username --> hue_test
98
+ list_of_lights --> hue_test
99
+
100
+
101
+
74
102
  classDef folder fill:#999,stroke:#333,stroke-width:2px;
75
103
  ```
76
104
 
77
105
  | | |
78
106
  | --- | --- |
79
- | [`hue`](https://raw.githubusercontent.com/kamangir/blue-assistant/main/blue_assistant/script/repository/hue) [![image](https://github.com/kamangir/assets/blob/main/blue-assistant/hue.jpg?raw=true)](https://raw.githubusercontent.com/kamangir/blue-assistant/main/blue_assistant/script/repository/hue) "send a color command to the Hue LED lights in my apartment." 🔥 | [`blue-amo`](https://raw.githubusercontent.com/kamangir/blue-assistant/main/blue_assistant/script/repository/blue_amo/README.md) [![image](https://github.com/kamangir/assets/raw/main/blue-amo-2025-02-03-nswnx6/stitching_the_frames-2.png?raw=true)](https://raw.githubusercontent.com/kamangir/blue-assistant/main/blue_assistant/script/repository/blue_amo/README.md) A story developed and visualized, by AI. |
107
+ | [`hue`](https://raw.githubusercontent.com/kamangir/blue-assistant/main/blue_assistant/script/repository/hue) [![image](https://github.com/kamangir/assets/raw/main/blue-assistant/20250314_143702.jpg?raw=true)](https://raw.githubusercontent.com/kamangir/blue-assistant/main/blue_assistant/script/repository/hue) "send a color command to the Hue LED lights in my apartment." | [`blue-amo`](https://raw.githubusercontent.com/kamangir/blue-assistant/main/blue_assistant/script/repository/blue_amo/README.md) [![image](https://github.com/kamangir/assets/raw/main/blue-amo-2025-02-03-nswnx6/stitching_the_frames-2.png?raw=true)](https://raw.githubusercontent.com/kamangir/blue-assistant/main/blue_assistant/script/repository/blue_amo/README.md) A story developed and visualized, by AI. |
80
108
  | [`orbital-data-explorer`](https://raw.githubusercontent.com/kamangir/blue-assistant/main/blue_assistant/script/repository/orbital_data_explorer/README.md) [![image](https://github.com/kamangir/assets/blob/main/blue-assistant/orbital-data-explorer.png?raw=true)](https://raw.githubusercontent.com/kamangir/blue-assistant/main/blue_assistant/script/repository/orbital_data_explorer/README.md) Access to the [Orbital Data Explorer](https://ode.rsl.wustl.edu/), through AI. ⏸️ | |
81
109
 
82
110
  ---
@@ -84,4 +112,4 @@ graph LR
84
112
 
85
113
  [![pylint](https://github.com/kamangir/blue-assistant/actions/workflows/pylint.yml/badge.svg)](https://github.com/kamangir/blue-assistant/actions/workflows/pylint.yml) [![pytest](https://github.com/kamangir/blue-assistant/actions/workflows/pytest.yml/badge.svg)](https://github.com/kamangir/blue-assistant/actions/workflows/pytest.yml) [![bashtest](https://github.com/kamangir/blue-assistant/actions/workflows/bashtest.yml/badge.svg)](https://github.com/kamangir/blue-assistant/actions/workflows/bashtest.yml) [![PyPI version](https://img.shields.io/pypi/v/blue-assistant.svg)](https://pypi.org/project/blue-assistant/) [![PyPI - Downloads](https://img.shields.io/pypi/dd/blue-assistant)](https://pypistats.org/packages/blue-assistant)
86
114
 
87
- built by 🌀 [`blue_options-4.234.1`](https://github.com/kamangir/awesome-bash-cli), based on 🧠 [`blue_assistant-4.194.1`](https://github.com/kamangir/blue-assistant).
115
+ built by 🌀 [`blue_options-4.234.1`](https://github.com/kamangir/awesome-bash-cli), based on 🧠 [`blue_assistant-4.226.1`](https://github.com/kamangir/blue-assistant).
@@ -17,6 +17,7 @@ graph LR
17
17
  url["🔗 url"]:::folder
18
18
  object["📂 object"]:::folder
19
19
 
20
+
20
21
  script --> assistant_script_list
21
22
 
22
23
  script --> assistant_script_run
@@ -26,12 +27,39 @@ graph LR
26
27
  url --> assistant_web_crawl
27
28
  assistant_web_crawl --> object
28
29
 
30
+
31
+ bridge_ip["🔗 bridge_ip"]:::folder
32
+ hue_username["🔗 hue_username"]:::folder
33
+ list_of_lights["💡 light IDs"]:::folder
34
+
35
+ hue_create_user["@hue<br>create_user"]
36
+ hue_list["@hue<br>list"]
37
+ hue_set["@hue<br>set"]
38
+ hue_test["@hue<br>test"]
39
+
40
+ bridge_ip --> hue_create_user
41
+ hue_create_user --> hue_username
42
+
43
+ bridge_ip --> hue_list
44
+ hue_username --> hue_list
45
+ hue_list --> list_of_lights
46
+
47
+ bridge_ip --> hue_set
48
+ hue_username --> hue_set
49
+ list_of_lights --> hue_set
50
+
51
+ bridge_ip --> hue_test
52
+ hue_username --> hue_test
53
+ list_of_lights --> hue_test
54
+
55
+
56
+
29
57
  classDef folder fill:#999,stroke:#333,stroke-width:2px;
30
58
  ```
31
59
 
32
60
  | | |
33
61
  | --- | --- |
34
- | [`hue`](./blue_assistant/script/repository/hue) [![image](https://github.com/kamangir/assets/blob/main/blue-assistant/hue.jpg?raw=true)](./blue_assistant/script/repository/hue) "send a color command to the Hue LED lights in my apartment." 🔥 | [`blue-amo`](./blue_assistant/script/repository/blue_amo/README.md) [![image](https://github.com/kamangir/assets/raw/main/blue-amo-2025-02-03-nswnx6/stitching_the_frames-2.png?raw=true)](./blue_assistant/script/repository/blue_amo/README.md) A story developed and visualized, by AI. |
62
+ | [`hue`](./blue_assistant/script/repository/hue) [![image](https://github.com/kamangir/assets/raw/main/blue-assistant/20250314_143702.jpg?raw=true)](./blue_assistant/script/repository/hue) "send a color command to the Hue LED lights in my apartment." | [`blue-amo`](./blue_assistant/script/repository/blue_amo/README.md) [![image](https://github.com/kamangir/assets/raw/main/blue-amo-2025-02-03-nswnx6/stitching_the_frames-2.png?raw=true)](./blue_assistant/script/repository/blue_amo/README.md) A story developed and visualized, by AI. |
35
63
  | [`orbital-data-explorer`](./blue_assistant/script/repository/orbital_data_explorer/README.md) [![image](https://github.com/kamangir/assets/blob/main/blue-assistant/orbital-data-explorer.png?raw=true)](./blue_assistant/script/repository/orbital_data_explorer/README.md) Access to the [Orbital Data Explorer](https://ode.rsl.wustl.edu/), through AI. ⏸️ | |
36
64
 
37
65
  ---
@@ -39,4 +67,4 @@ graph LR
39
67
 
40
68
  [![pylint](https://github.com/kamangir/blue-assistant/actions/workflows/pylint.yml/badge.svg)](https://github.com/kamangir/blue-assistant/actions/workflows/pylint.yml) [![pytest](https://github.com/kamangir/blue-assistant/actions/workflows/pytest.yml/badge.svg)](https://github.com/kamangir/blue-assistant/actions/workflows/pytest.yml) [![bashtest](https://github.com/kamangir/blue-assistant/actions/workflows/bashtest.yml/badge.svg)](https://github.com/kamangir/blue-assistant/actions/workflows/bashtest.yml) [![PyPI version](https://img.shields.io/pypi/v/blue-assistant.svg)](https://pypi.org/project/blue-assistant/) [![PyPI - Downloads](https://img.shields.io/pypi/dd/blue-assistant)](https://pypistats.org/packages/blue-assistant)
41
69
 
42
- built by 🌀 [`blue_options-4.234.1`](https://github.com/kamangir/awesome-bash-cli), based on 🧠 [`blue_assistant-4.194.1`](https://github.com/kamangir/blue-assistant).
70
+ built by 🌀 [`blue_options-4.234.1`](https://github.com/kamangir/awesome-bash-cli), based on 🧠 [`blue_assistant-4.226.1`](https://github.com/kamangir/blue-assistant).
@@ -0,0 +1,11 @@
1
+ #! /usr/bin/env bash
2
+
3
+ function blue_assistant_hue_create_user() {
4
+ local options=$1
5
+ local do_dryrun=$(abcli_option_int "$options" dryrun 0)
6
+
7
+ abcli_eval dryrun=$do_dryrun \
8
+ python3 -m blue_assistant.script.repository.hue \
9
+ create_user \
10
+ "${@:2}"
11
+ }
@@ -0,0 +1,11 @@
1
+ #! /usr/bin/env bash
2
+
3
+ function blue_assistant_hue_list() {
4
+ local options=$1
5
+ local do_dryrun=$(abcli_option_int "$options" dryrun 0)
6
+
7
+ abcli_eval dryrun=$do_dryrun \
8
+ python3 -m blue_assistant.script.repository.hue \
9
+ list \
10
+ "${@:2}"
11
+ }
@@ -9,7 +9,7 @@ function blue_assistant_hue() {
9
9
  return
10
10
  fi
11
11
 
12
- python3 -m blue_assistant.hue "$@"
12
+ python3 -m blue_assistant.script.repository.hue "$@"
13
13
  }
14
14
 
15
15
  abcli_source_caller_suffix_path /hue
@@ -27,7 +27,10 @@ function test_blue_assistant_help() {
27
27
  "@assistant web crawl" \
28
28
  \
29
29
  "@hue" \
30
+ "@hue create_user" \
31
+ "@hue list" \
30
32
  "@hue set" \
33
+ "@hue test" \
31
34
  \
32
35
  "blue_assistant"; do
33
36
  abcli_eval ,$options \
@@ -10,8 +10,8 @@ items = README.Items(
10
10
  {
11
11
  "name": "hue",
12
12
  "url": "./blue_assistant/script/repository/hue",
13
- "marquee": "https://github.com/kamangir/assets/blob/main/blue-assistant/hue.jpg?raw=true",
14
- "description": '"send a color command to the Hue LED lights in my apartment." 🔥',
13
+ "marquee": "https://github.com/kamangir/assets/raw/main/blue-assistant/20250314_143702.jpg?raw=true",
14
+ "description": '"send a color command to the Hue LED lights in my apartment."',
15
15
  },
16
16
  {
17
17
  "name": "blue-amo",
@@ -4,7 +4,7 @@ ICON = "🧠"
4
4
 
5
5
  DESCRIPTION = f"{ICON} An AI Assistant."
6
6
 
7
- VERSION = "4.194.1"
7
+ VERSION = "4.226.1"
8
8
 
9
9
  REPO_NAME = "blue-assistant"
10
10
 
@@ -5,4 +5,6 @@ BLUE_ASSISTANT_IMAGE_DEFAULT_MODEL=dall-e-3
5
5
  BLUE_ASSISTANT_IMAGE_DEFAULT_QUALITY=standard
6
6
  BLUE_ASSISTANT_IMAGE_DEFAULT_SIZE=1024x1024
7
7
 
8
- HUE_BRIDGE_IP_ADDRESS=192.168.1.95
8
+ HUE_BRIDGE_IP_ADDRESS=192.168.1.95
9
+ HUE_TEST_DEFAULT_INTERVAL=0.01
10
+ HUE_MAX_SATURATION=254
@@ -15,3 +15,7 @@ BLUE_ASSISTANT_IMAGE_DEFAULT_QUALITY = get_env("BLUE_ASSISTANT_IMAGE_DEFAULT_QUA
15
15
  BLUE_ASSISTANT_IMAGE_DEFAULT_SIZE = get_env("BLUE_ASSISTANT_IMAGE_DEFAULT_SIZE")
16
16
 
17
17
  HUE_BRIDGE_IP_ADDRESS = get_env("HUE_BRIDGE_IP_ADDRESS")
18
+
19
+ HUE_BRIDGE_USERNAME = get_env("HUE_BRIDGE_USERNAME")
20
+ HUE_TEST_DEFAULT_INTERVAL = get_env("HUE_TEST_DEFAULT_INTERVAL", 0.01)
21
+ HUE_MAX_SATURATION = get_env("HUE_MAX_SATURATION", 254)
@@ -0,0 +1,117 @@
1
+ from typing import List
2
+ import cv2
3
+
4
+ from blue_options.terminal import show_usage, xtra
5
+
6
+ from blue_assistant import env
7
+
8
+
9
+ def help_create_user(
10
+ tokens: List[str],
11
+ mono: bool,
12
+ ) -> str:
13
+ options = xtra("dryrun", mono=mono)
14
+
15
+ args = [
16
+ f"[--bridge_ip <{env.HUE_BRIDGE_IP_ADDRESS}>]",
17
+ ]
18
+
19
+ return show_usage(
20
+ [
21
+ "@hue",
22
+ "create_user",
23
+ f"[{options}]",
24
+ ]
25
+ + args,
26
+ "create a hue user.",
27
+ mono=mono,
28
+ )
29
+
30
+
31
+ def help_list(
32
+ tokens: List[str],
33
+ mono: bool,
34
+ ) -> str:
35
+ options = xtra("dryrun", mono=mono)
36
+
37
+ args = [
38
+ f"[--bridge_ip <{env.HUE_BRIDGE_IP_ADDRESS}>]",
39
+ f"[--username <{env.HUE_BRIDGE_USERNAME}>]",
40
+ "[--verbose 1]",
41
+ ]
42
+
43
+ return show_usage(
44
+ [
45
+ "@hue",
46
+ "list",
47
+ f"[{options}]",
48
+ ]
49
+ + args,
50
+ "list hue lights.",
51
+ mono=mono,
52
+ )
53
+
54
+
55
+ def help_set(
56
+ tokens: List[str],
57
+ mono: bool,
58
+ ) -> str:
59
+ options = xtra("dryrun", mono=mono)
60
+
61
+ args = [
62
+ f"[--bridge_ip <{env.HUE_BRIDGE_IP_ADDRESS}>]",
63
+ f"[--username <{env.HUE_BRIDGE_USERNAME}>]",
64
+ "[--light_id <light_id>]",
65
+ "[--hue <65535>]",
66
+ f"[--saturation <{env.HUE_MAX_SATURATION}>]",
67
+ "[--verbose 1]",
68
+ ]
69
+
70
+ return show_usage(
71
+ [
72
+ "@hue",
73
+ "set",
74
+ f"[{options}]",
75
+ ]
76
+ + args,
77
+ "set hue lights.",
78
+ mono=mono,
79
+ )
80
+
81
+
82
+ def help_test(
83
+ tokens: List[str],
84
+ mono: bool,
85
+ ) -> str:
86
+ options = xtra("dryrun", mono=mono)
87
+
88
+ args = [
89
+ f"[--bridge_ip <{env.HUE_BRIDGE_IP_ADDRESS}>]",
90
+ f"[--username <{env.HUE_BRIDGE_USERNAME}>]",
91
+ "[--light_id all | <light_id>]",
92
+ f"[--interval <{env.HUE_TEST_DEFAULT_INTERVAL:.2f}>]",
93
+ f"[--colormap <{cv2.COLORMAP_HOT}>]",
94
+ "[--verbose 1]",
95
+ ]
96
+
97
+ return show_usage(
98
+ [
99
+ "@hue",
100
+ "test",
101
+ f"[{options}]",
102
+ ]
103
+ + args,
104
+ "test hue.",
105
+ {
106
+ "colormap: https://docs.opencv.org/4.x/d3/d50/group__imgproc__colormap.html": [],
107
+ },
108
+ mono=mono,
109
+ )
110
+
111
+
112
+ help_functions = {
113
+ "create_user": help_create_user,
114
+ "list": help_list,
115
+ "set": help_set,
116
+ "test": help_test,
117
+ }
@@ -0,0 +1 @@
1
+ HUE_BRIDGE_USERNAME=
@@ -0,0 +1,108 @@
1
+ import argparse
2
+ import cv2
3
+
4
+ from blueness import module
5
+ from blueness.argparse.generic import sys_exit
6
+
7
+ from blue_assistant import NAME
8
+ from blue_assistant import env
9
+ from blue_assistant.script.repository.hue.api import (
10
+ create_user,
11
+ list_lights,
12
+ set_light_color,
13
+ test,
14
+ )
15
+ from blue_assistant.logger import logger
16
+
17
+ NAME = module.name(__file__, NAME)
18
+
19
+ parser = argparse.ArgumentParser(NAME)
20
+ parser.add_argument(
21
+ "task",
22
+ type=str,
23
+ help="create_user | list | set | test",
24
+ )
25
+ parser.add_argument(
26
+ "--bridge_ip",
27
+ type=str,
28
+ default=env.HUE_BRIDGE_IP_ADDRESS,
29
+ )
30
+ parser.add_argument(
31
+ "--username",
32
+ type=str,
33
+ default=env.HUE_BRIDGE_USERNAME,
34
+ help="aka API key",
35
+ )
36
+ parser.add_argument(
37
+ "--light_id",
38
+ type=str,
39
+ default="",
40
+ help="all | <light_id>",
41
+ )
42
+ parser.add_argument(
43
+ "--hue",
44
+ type=int,
45
+ default=65535,
46
+ help="0 to 65535",
47
+ )
48
+ parser.add_argument(
49
+ "--saturation",
50
+ type=int,
51
+ default=env.HUE_MAX_SATURATION,
52
+ help=f"0 to {env.HUE_MAX_SATURATION}",
53
+ )
54
+ parser.add_argument(
55
+ "--verbose",
56
+ type=int,
57
+ default=0,
58
+ help="0 | 1",
59
+ )
60
+ parser.add_argument(
61
+ "--interval",
62
+ type=float,
63
+ default=env.HUE_TEST_DEFAULT_INTERVAL,
64
+ help="in seconds",
65
+ )
66
+ parser.add_argument(
67
+ "--colormap",
68
+ type=int,
69
+ default=cv2.COLORMAP_HOT,
70
+ help="//docs.opencv.org/4.x/d3/d50/group__imgproc__colormap.html",
71
+ )
72
+ args = parser.parse_args()
73
+
74
+ success = False
75
+ if args.task == "create_user":
76
+ username = create_user(
77
+ bridge_ip=args.bridge_ip,
78
+ )
79
+ if username:
80
+ success = True
81
+ elif args.task == "list":
82
+ success, _ = list_lights(
83
+ bridge_ip=args.bridge_ip,
84
+ username=args.username,
85
+ verbose=args.verbose == 1,
86
+ )
87
+ elif args.task == "set":
88
+ success = set_light_color(
89
+ bridge_ip=args.bridge_ip,
90
+ username=args.username,
91
+ light_id=args.light_id,
92
+ hue=args.hue,
93
+ saturation=args.saturation,
94
+ verbose=args.verbose == 1,
95
+ )
96
+ elif args.task == "test":
97
+ success = test(
98
+ bridge_ip=args.bridge_ip,
99
+ username=args.username,
100
+ light_id=args.light_id,
101
+ interval=args.interval,
102
+ colormap=args.colormap,
103
+ verbose=args.verbose == 1,
104
+ )
105
+ else:
106
+ success = None
107
+
108
+ sys_exit(logger, NAME, args.task, success)
@@ -0,0 +1,186 @@
1
+ from typing import Tuple, Dict, List
2
+ import requests
3
+ from time import sleep
4
+ from tqdm import tqdm
5
+ import cv2
6
+ import random
7
+
8
+ from blueness import module
9
+
10
+ from blue_assistant import NAME
11
+ from blue_assistant import env
12
+ from blue_assistant.script.repository.hue.colors import get_hue_values
13
+ from blue_assistant.logger import logger
14
+
15
+ NAME = module.name(__file__, NAME)
16
+
17
+
18
+ # hue-2025-03-14-1l8tv6
19
+ def create_user(
20
+ bridge_ip: str = env.HUE_BRIDGE_IP_ADDRESS,
21
+ wait_for_link_press: bool = True,
22
+ ) -> str:
23
+ URL = f"http://{bridge_ip}/api"
24
+
25
+ payload = {
26
+ "devicetype": "my_hue_app#python_script",
27
+ }
28
+
29
+ if wait_for_link_press:
30
+ input("Press the link button on the Hue Bridge ...")
31
+
32
+ try:
33
+ response = requests.post(URL, json=payload)
34
+
35
+ if response.status_code == 200:
36
+ result = response.json()
37
+ if "success" in result[0]:
38
+ username = result[0]["success"]["username"]
39
+ logger.info(f"created {username}")
40
+ return username
41
+
42
+ logger.error(result)
43
+ return ""
44
+
45
+ logger.error(response)
46
+ return ""
47
+ except Exception as e:
48
+ logger.error(e)
49
+ return ""
50
+
51
+
52
+ # hue-2025-03-14-4r9mgh
53
+ def list_lights(
54
+ bridge_ip: str = env.HUE_BRIDGE_IP_ADDRESS,
55
+ username: str = env.HUE_BRIDGE_USERNAME,
56
+ verbose: bool = False,
57
+ ) -> Tuple[bool, Dict]:
58
+ URL = f"http://{bridge_ip}/api/{username}"
59
+
60
+ response = requests.get(URL)
61
+
62
+ if response.status_code != 200:
63
+ logger.error(response)
64
+ return False, {}
65
+
66
+ list_of_lights = response.json()["lights"]
67
+ logger.info(
68
+ "found {} light(s): {}".format(
69
+ len(list_of_lights),
70
+ ", ".join(list_of_lights.keys()),
71
+ )
72
+ )
73
+ if verbose:
74
+ for light_id, light_info in list_of_lights.items():
75
+ logger.info(f"#{light_id}: {light_info}")
76
+
77
+ return True, list_of_lights
78
+
79
+
80
+ # hue-2025-03-13-1xjr1z
81
+ def set_light_color(
82
+ light_id: str,
83
+ hue: int, # 0 to 65535
84
+ saturation: int, # 0 to 254
85
+ bridge_ip: str = env.HUE_BRIDGE_IP_ADDRESS,
86
+ username: str = env.HUE_BRIDGE_USERNAME,
87
+ verbose: bool = False,
88
+ ) -> bool:
89
+ logger.info(
90
+ "{}.set_light_color({}@{}:{}) -> hue=0x{:x}, saturation=0x{:x}".format(
91
+ NAME,
92
+ username,
93
+ bridge_ip,
94
+ light_id,
95
+ hue,
96
+ saturation,
97
+ )
98
+ )
99
+
100
+ # Construct the API endpoint URL
101
+ url = f"http://{bridge_ip}/api/{username}/lights/{light_id}/state"
102
+
103
+ # Prepare the payload with the desired hue and saturation
104
+ payload = {
105
+ "hue": hue,
106
+ "sat": saturation,
107
+ }
108
+
109
+ response = requests.put(url, json=payload)
110
+
111
+ # https://chat.openai.com/c/6deb94d0-826a-48de-b5ef-f7d8da416c82
112
+ # response.raise_for_status()
113
+ if response.status_code // 100 != 2:
114
+ logger.error(response)
115
+ return False
116
+
117
+ if verbose:
118
+ logger.info(response.json())
119
+
120
+ return True
121
+
122
+
123
+ def test(
124
+ colormap: int = cv2.COLORMAP_HOT,
125
+ light_id: str = "all",
126
+ interval: float = env.HUE_TEST_DEFAULT_INTERVAL,
127
+ bridge_ip: str = env.HUE_BRIDGE_IP_ADDRESS,
128
+ username: str = env.HUE_BRIDGE_USERNAME,
129
+ verbose: bool = False,
130
+ ) -> bool:
131
+ if not light_id:
132
+ light_id = "all"
133
+
134
+ logger.info(
135
+ "{}.test({}@{}:{}) @ colormap #{}, interval={} s".format(
136
+ NAME,
137
+ username,
138
+ bridge_ip,
139
+ light_id,
140
+ colormap,
141
+ interval,
142
+ )
143
+ )
144
+
145
+ list_of_lights: List[str]
146
+ if light_id == "all":
147
+ success, dict_of_lights = list_lights(
148
+ bridge_ip=bridge_ip,
149
+ username=username,
150
+ verbose=verbose,
151
+ )
152
+ if not success:
153
+ return success
154
+ list_of_lights = list(dict_of_lights.keys())
155
+ else:
156
+ list_of_lights = [light_id]
157
+
158
+ list_of_hue_values = get_hue_values(
159
+ colormap=colormap,
160
+ length=len(list_of_lights),
161
+ )
162
+ list_of_hue_values = list_of_hue_values + list_of_hue_values
163
+
164
+ hue_offset: int = 0
165
+ try:
166
+ while True:
167
+ logger.info(f"hue_offset={hue_offset}")
168
+
169
+ for light_index in tqdm(range(len(list_of_lights))):
170
+ set_light_color(
171
+ light_id=list_of_lights[light_index],
172
+ hue=list_of_hue_values[hue_offset + light_index],
173
+ saturation=random.randint(1, env.HUE_MAX_SATURATION),
174
+ bridge_ip=bridge_ip,
175
+ username=username,
176
+ verbose=verbose,
177
+ )
178
+
179
+ sleep(interval)
180
+
181
+ hue_offset = (hue_offset + 1) % len(list_of_lights)
182
+
183
+ except KeyboardInterrupt:
184
+ logger.info("Ctrl+C detected.")
185
+
186
+ return True
@@ -0,0 +1,21 @@
1
+ from typing import List
2
+ import numpy as np
3
+ import cv2
4
+
5
+
6
+ # https://chatgpt.com/c/67d4c06c-2168-8005-9d8b-4b6c9848957e
7
+ def get_hue_values(
8
+ colormap: int = cv2.COLORMAP_HOT,
9
+ length: int = 255,
10
+ ) -> List[int]:
11
+ # Create a gradient from 0 to 255
12
+ gradient = np.linspace(0, 255, length).astype("uint8")
13
+ gradient = np.repeat(gradient[np.newaxis, :], 1, axis=0)
14
+
15
+ # Apply the colormap
16
+ color_mapped_image = cv2.applyColorMap(gradient, colormap)
17
+
18
+ # Convert BGR to HSV
19
+ hsv_image = cv2.cvtColor(color_mapped_image, cv2.COLOR_BGR2HSV)
20
+
21
+ return (hsv_image[0, :, 0] * (65535 / 179)).astype(int).tolist()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: blue_assistant
3
- Version: 4.194.1
3
+ Version: 4.226.1
4
4
  Summary: 🧠 An AI Assistant.
5
5
  Home-page: https://github.com/kamangir/blue-assistant
6
6
  Author: Arash Abadpour (Kamangir)
@@ -62,6 +62,7 @@ graph LR
62
62
  url["🔗 url"]:::folder
63
63
  object["📂 object"]:::folder
64
64
 
65
+
65
66
  script --> assistant_script_list
66
67
 
67
68
  script --> assistant_script_run
@@ -71,12 +72,39 @@ graph LR
71
72
  url --> assistant_web_crawl
72
73
  assistant_web_crawl --> object
73
74
 
75
+
76
+ bridge_ip["🔗 bridge_ip"]:::folder
77
+ hue_username["🔗 hue_username"]:::folder
78
+ list_of_lights["💡 light IDs"]:::folder
79
+
80
+ hue_create_user["@hue<br>create_user"]
81
+ hue_list["@hue<br>list"]
82
+ hue_set["@hue<br>set"]
83
+ hue_test["@hue<br>test"]
84
+
85
+ bridge_ip --> hue_create_user
86
+ hue_create_user --> hue_username
87
+
88
+ bridge_ip --> hue_list
89
+ hue_username --> hue_list
90
+ hue_list --> list_of_lights
91
+
92
+ bridge_ip --> hue_set
93
+ hue_username --> hue_set
94
+ list_of_lights --> hue_set
95
+
96
+ bridge_ip --> hue_test
97
+ hue_username --> hue_test
98
+ list_of_lights --> hue_test
99
+
100
+
101
+
74
102
  classDef folder fill:#999,stroke:#333,stroke-width:2px;
75
103
  ```
76
104
 
77
105
  | | |
78
106
  | --- | --- |
79
- | [`hue`](https://raw.githubusercontent.com/kamangir/blue-assistant/main/blue_assistant/script/repository/hue) [![image](https://github.com/kamangir/assets/blob/main/blue-assistant/hue.jpg?raw=true)](https://raw.githubusercontent.com/kamangir/blue-assistant/main/blue_assistant/script/repository/hue) "send a color command to the Hue LED lights in my apartment." 🔥 | [`blue-amo`](https://raw.githubusercontent.com/kamangir/blue-assistant/main/blue_assistant/script/repository/blue_amo/README.md) [![image](https://github.com/kamangir/assets/raw/main/blue-amo-2025-02-03-nswnx6/stitching_the_frames-2.png?raw=true)](https://raw.githubusercontent.com/kamangir/blue-assistant/main/blue_assistant/script/repository/blue_amo/README.md) A story developed and visualized, by AI. |
107
+ | [`hue`](https://raw.githubusercontent.com/kamangir/blue-assistant/main/blue_assistant/script/repository/hue) [![image](https://github.com/kamangir/assets/raw/main/blue-assistant/20250314_143702.jpg?raw=true)](https://raw.githubusercontent.com/kamangir/blue-assistant/main/blue_assistant/script/repository/hue) "send a color command to the Hue LED lights in my apartment." | [`blue-amo`](https://raw.githubusercontent.com/kamangir/blue-assistant/main/blue_assistant/script/repository/blue_amo/README.md) [![image](https://github.com/kamangir/assets/raw/main/blue-amo-2025-02-03-nswnx6/stitching_the_frames-2.png?raw=true)](https://raw.githubusercontent.com/kamangir/blue-assistant/main/blue_assistant/script/repository/blue_amo/README.md) A story developed and visualized, by AI. |
80
108
  | [`orbital-data-explorer`](https://raw.githubusercontent.com/kamangir/blue-assistant/main/blue_assistant/script/repository/orbital_data_explorer/README.md) [![image](https://github.com/kamangir/assets/blob/main/blue-assistant/orbital-data-explorer.png?raw=true)](https://raw.githubusercontent.com/kamangir/blue-assistant/main/blue_assistant/script/repository/orbital_data_explorer/README.md) Access to the [Orbital Data Explorer](https://ode.rsl.wustl.edu/), through AI. ⏸️ | |
81
109
 
82
110
  ---
@@ -84,4 +112,4 @@ graph LR
84
112
 
85
113
  [![pylint](https://github.com/kamangir/blue-assistant/actions/workflows/pylint.yml/badge.svg)](https://github.com/kamangir/blue-assistant/actions/workflows/pylint.yml) [![pytest](https://github.com/kamangir/blue-assistant/actions/workflows/pytest.yml/badge.svg)](https://github.com/kamangir/blue-assistant/actions/workflows/pytest.yml) [![bashtest](https://github.com/kamangir/blue-assistant/actions/workflows/bashtest.yml/badge.svg)](https://github.com/kamangir/blue-assistant/actions/workflows/bashtest.yml) [![PyPI version](https://img.shields.io/pypi/v/blue-assistant.svg)](https://pypi.org/project/blue-assistant/) [![PyPI - Downloads](https://img.shields.io/pypi/dd/blue-assistant)](https://pypistats.org/packages/blue-assistant)
86
114
 
87
- built by 🌀 [`blue_options-4.234.1`](https://github.com/kamangir/awesome-bash-cli), based on 🧠 [`blue_assistant-4.194.1`](https://github.com/kamangir/blue-assistant).
115
+ built by 🌀 [`blue_options-4.234.1`](https://github.com/kamangir/awesome-bash-cli), based on 🧠 [`blue_assistant-4.226.1`](https://github.com/kamangir/blue-assistant).
@@ -27,6 +27,8 @@ blue_assistant/.abcli/browse.sh
27
27
  blue_assistant/.abcli/hue.sh
28
28
  blue_assistant/.abcli/script.sh
29
29
  blue_assistant/.abcli/web.sh
30
+ blue_assistant/.abcli/hue/create_user.sh
31
+ blue_assistant/.abcli/hue/list.sh
30
32
  blue_assistant/.abcli/hue/set.sh
31
33
  blue_assistant/.abcli/script/list.sh
32
34
  blue_assistant/.abcli/script/run.sh
@@ -62,8 +64,9 @@ blue_assistant/script/repository/generic/__init__.py
62
64
  blue_assistant/script/repository/generic/classes.py
63
65
  blue_assistant/script/repository/hue/__init__.py
64
66
  blue_assistant/script/repository/hue/__main__.py
67
+ blue_assistant/script/repository/hue/api.py
65
68
  blue_assistant/script/repository/hue/classes.py
66
- blue_assistant/script/repository/hue/functions.py
69
+ blue_assistant/script/repository/hue/colors.py
67
70
  blue_assistant/script/repository/orbital_data_explorer/__init__.py
68
71
  blue_assistant/script/repository/orbital_data_explorer/classes.py
69
72
  blue_assistant/script/repository/orbital_data_explorer/actions/__init__.py
@@ -1,36 +0,0 @@
1
- from typing import List
2
-
3
- from blue_options.terminal import show_usage, xtra
4
-
5
- from blue_assistant import env
6
-
7
-
8
- def help_set(
9
- tokens: List[str],
10
- mono: bool,
11
- ) -> str:
12
- options = xtra("dryrun", mono=mono)
13
-
14
- args = [
15
- f"[--bridge_ip <{env.HUE_BRIDGE_IP_ADDRESS}>]",
16
- "[--username <username>]",
17
- "[--light_id <light_id>]",
18
- "[--hue <65535>]",
19
- "[--saturation <254>]",
20
- "[--verbose 1]",
21
- ]
22
- return show_usage(
23
- [
24
- "@hue",
25
- "set",
26
- f"[{options}]",
27
- ]
28
- + args,
29
- "set hue lights.",
30
- mono=mono,
31
- )
32
-
33
-
34
- help_functions = {
35
- "set": help_set,
36
- }
File without changes
@@ -1,66 +0,0 @@
1
- import argparse
2
-
3
- from blueness import module
4
- from blueness.argparse.generic import sys_exit
5
-
6
- from blue_assistant import NAME
7
- from blue_assistant import env
8
- from blue_assistant.script.repository.hue.functions import set_light_color
9
- from blue_assistant.logger import logger
10
-
11
- NAME = module.name(__file__, NAME)
12
-
13
- parser = argparse.ArgumentParser(NAME)
14
- parser.add_argument(
15
- "task",
16
- type=str,
17
- help="set",
18
- )
19
- parser.add_argument(
20
- "--bridge_ip",
21
- type=str,
22
- default=env.HUE_BRIDGE_IP_ADDRESS,
23
- )
24
- parser.add_argument(
25
- "--username",
26
- type=str,
27
- help="aka API key",
28
- )
29
- parser.add_argument(
30
- "--light_id",
31
- type=str,
32
- )
33
- parser.add_argument(
34
- "--hue",
35
- type=int,
36
- default=65535,
37
- help="0 to 65535",
38
- )
39
- parser.add_argument(
40
- "--saturation",
41
- type=int,
42
- default=254,
43
- help="0 to 254",
44
- )
45
- parser.add_argument(
46
- "--verbose",
47
- type=int,
48
- default=0,
49
- help="0 | 1",
50
- )
51
- args = parser.parse_args()
52
-
53
- success = False
54
- if args.task == "set":
55
- success = set_light_color(
56
- bridge_ip=args.bridge_ip,
57
- username=args.username,
58
- light_id=args.light_id,
59
- hue=args.hue,
60
- saturation=args.saturation,
61
- verbose=args.verbose == 1,
62
- )
63
- else:
64
- success = None
65
-
66
- sys_exit(logger, NAME, args.task, success)
@@ -1,53 +0,0 @@
1
- import requests
2
-
3
- from blueness import module
4
-
5
- from blue_assistant import NAME
6
- from blue_assistant import env
7
- from blue_assistant.logger import logger
8
-
9
- NAME = module.name(__file__, NAME)
10
-
11
-
12
- def set_light_color(
13
- username: str,
14
- light_id: str,
15
- hue: int, # 0 to 65535
16
- saturation: int, # 0 to 254
17
- bridge_ip: str = env.HUE_BRIDGE_IP_ADDRESS,
18
- verbose: bool = False,
19
- ) -> bool:
20
- logger.info(
21
- "{}.set_light_color({}@{}:{}) -> hue=0x{:x}, saturation=0x{:x}".format(
22
- NAME,
23
- username,
24
- bridge_ip,
25
- light_id,
26
- hue,
27
- saturation,
28
- )
29
- )
30
-
31
- # hue-2025-03-13-1xjr1z
32
-
33
- # Construct the API endpoint URL
34
- url = f"http://{bridge_ip}/api/{username}/lights/{light_id}/state"
35
-
36
- # Prepare the payload with the desired hue and saturation
37
- payload = {
38
- "hue": hue,
39
- "sat": saturation,
40
- }
41
-
42
- response = requests.put(url, json=payload)
43
-
44
- # https://chat.openai.com/c/6deb94d0-826a-48de-b5ef-f7d8da416c82
45
- # response.raise_for_status()
46
- if response.status_code // 100 != 2:
47
- logger.error(response)
48
- return False
49
-
50
- if verbose:
51
- logger.info(response.json())
52
-
53
- return True