blue-sandbox 5.348.1__tar.gz → 5.362.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 (47) hide show
  1. {blue_sandbox-5.348.1/blue_sandbox.egg-info → blue_sandbox-5.362.1}/PKG-INFO +4 -3
  2. {blue_sandbox-5.348.1 → blue_sandbox-5.362.1}/README.md +2 -2
  3. {blue_sandbox-5.348.1 → blue_sandbox-5.362.1}/blue_sandbox/README.py +6 -1
  4. blue_sandbox-5.362.1/blue_sandbox/WebDAV/__init__.py +1 -0
  5. blue_sandbox-5.362.1/blue_sandbox/WebDAV/interface.py +104 -0
  6. {blue_sandbox-5.348.1 → blue_sandbox-5.362.1}/blue_sandbox/__init__.py +1 -1
  7. blue_sandbox-5.362.1/blue_sandbox/env.py +25 -0
  8. blue_sandbox-5.362.1/blue_sandbox/sample.env +6 -0
  9. {blue_sandbox-5.348.1 → blue_sandbox-5.362.1/blue_sandbox.egg-info}/PKG-INFO +4 -3
  10. {blue_sandbox-5.348.1 → blue_sandbox-5.362.1}/blue_sandbox.egg-info/SOURCES.txt +2 -0
  11. {blue_sandbox-5.348.1 → blue_sandbox-5.362.1}/blue_sandbox.egg-info/requires.txt +1 -0
  12. {blue_sandbox-5.348.1 → blue_sandbox-5.362.1}/requirements.txt +4 -1
  13. {blue_sandbox-5.348.1 → blue_sandbox-5.362.1}/setup.py +1 -0
  14. blue_sandbox-5.348.1/blue_sandbox/env.py +0 -30
  15. blue_sandbox-5.348.1/blue_sandbox/sample.env +0 -2
  16. {blue_sandbox-5.348.1 → blue_sandbox-5.362.1}/LICENSE +0 -0
  17. {blue_sandbox-5.348.1 → blue_sandbox-5.362.1}/MANIFEST.in +0 -0
  18. {blue_sandbox-5.348.1 → blue_sandbox-5.362.1}/blue_sandbox/.abcli/abcli.sh +0 -0
  19. {blue_sandbox-5.348.1 → blue_sandbox-5.362.1}/blue_sandbox/.abcli/actions.sh +0 -0
  20. {blue_sandbox-5.348.1 → blue_sandbox-5.362.1}/blue_sandbox/.abcli/aka.sh +0 -0
  21. {blue_sandbox-5.348.1 → blue_sandbox-5.362.1}/blue_sandbox/.abcli/alias.sh +0 -0
  22. {blue_sandbox-5.348.1 → blue_sandbox-5.362.1}/blue_sandbox/.abcli/assets/publish.sh +0 -0
  23. {blue_sandbox-5.348.1 → blue_sandbox-5.362.1}/blue_sandbox/.abcli/assets.sh +0 -0
  24. {blue_sandbox-5.348.1 → blue_sandbox-5.362.1}/blue_sandbox/.abcli/blue_sandbox.sh +0 -0
  25. {blue_sandbox-5.348.1 → blue_sandbox-5.362.1}/blue_sandbox/.abcli/browse.sh +0 -0
  26. {blue_sandbox-5.348.1 → blue_sandbox-5.362.1}/blue_sandbox/.abcli/install.sh +0 -0
  27. {blue_sandbox-5.348.1 → blue_sandbox-5.362.1}/blue_sandbox/.abcli/tests/README.sh +0 -0
  28. {blue_sandbox-5.348.1 → blue_sandbox-5.362.1}/blue_sandbox/.abcli/tests/help.sh +0 -0
  29. {blue_sandbox-5.348.1 → blue_sandbox-5.362.1}/blue_sandbox/.abcli/tests/version.sh +0 -0
  30. {blue_sandbox-5.348.1 → blue_sandbox-5.362.1}/blue_sandbox/__main__.py +0 -0
  31. {blue_sandbox-5.348.1 → blue_sandbox-5.362.1}/blue_sandbox/assets/__init__.py +0 -0
  32. {blue_sandbox-5.348.1 → blue_sandbox-5.362.1}/blue_sandbox/assets/__main__.py +0 -0
  33. {blue_sandbox-5.348.1 → blue_sandbox-5.362.1}/blue_sandbox/assets/functions.py +0 -0
  34. {blue_sandbox-5.348.1 → blue_sandbox-5.362.1}/blue_sandbox/config.env +0 -0
  35. {blue_sandbox-5.348.1 → blue_sandbox-5.362.1}/blue_sandbox/functions.py +0 -0
  36. {blue_sandbox-5.348.1 → blue_sandbox-5.362.1}/blue_sandbox/help/__init__.py +0 -0
  37. {blue_sandbox-5.348.1 → blue_sandbox-5.362.1}/blue_sandbox/help/__main__.py +0 -0
  38. {blue_sandbox-5.348.1 → blue_sandbox-5.362.1}/blue_sandbox/help/functions.py +0 -0
  39. {blue_sandbox-5.348.1 → blue_sandbox-5.362.1}/blue_sandbox/host.py +0 -0
  40. {blue_sandbox-5.348.1 → blue_sandbox-5.362.1}/blue_sandbox/logger.py +0 -0
  41. {blue_sandbox-5.348.1 → blue_sandbox-5.362.1}/blue_sandbox/urls.py +0 -0
  42. {blue_sandbox-5.348.1 → blue_sandbox-5.362.1}/blue_sandbox/virtualcam/__init__.py +0 -0
  43. {blue_sandbox-5.348.1 → blue_sandbox-5.362.1}/blue_sandbox/virtualcam/__main__.py +0 -0
  44. {blue_sandbox-5.348.1 → blue_sandbox-5.362.1}/blue_sandbox.egg-info/dependency_links.txt +0 -0
  45. {blue_sandbox-5.348.1 → blue_sandbox-5.362.1}/blue_sandbox.egg-info/top_level.txt +0 -0
  46. {blue_sandbox-5.348.1 → blue_sandbox-5.362.1}/pyproject.toml +0 -0
  47. {blue_sandbox-5.348.1 → blue_sandbox-5.362.1}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: blue_sandbox
3
- Version: 5.348.1
3
+ Version: 5.362.1
4
4
  Summary: 🌀 A sandbox for ideas and experiments.
5
5
  Home-page: https://github.com/kamangir/blue-sandbox
6
6
  Author: Arash Abadpour (Kamangir)
@@ -32,6 +32,7 @@ Requires-Dist: pylint
32
32
  Requires-Dist: pytest
33
33
  Requires-Dist: python-dotenv[cli]
34
34
  Requires-Dist: tqdm
35
+ Requires-Dist: webdavclient3
35
36
  Dynamic: author
36
37
  Dynamic: author-email
37
38
  Dynamic: classifier
@@ -53,13 +54,13 @@ pip install blue-sandbox
53
54
 
54
55
  | | | |
55
56
  | --- | --- | --- |
56
- | [`virtualcam`](https://github.com/kamangir/blue-sandbox/blob/main/blue_sandbox/virtualcam) [![image](https://github.com/kamangir/assets/raw/main/blue-sandbox/virtualcam.png?raw=true)](https://github.com/kamangir/blue-sandbox/blob/main/blue_sandbox/virtualcam) Python + [OBS Studio](https://obsproject.com/) ⏸️ | | |
57
+ | [`WebDAV`](https://github.com/kamangir/blue-sandbox/blob/main/blue_sandbox/WebDAV) [![image](https://github.com/kamangir/assets/raw/main/blue-sandbox/WebDAV.png?raw=true)](https://github.com/kamangir/blue-sandbox/blob/main/blue_sandbox/WebDAV) An interface to [WebDAV](http://www.webdav.org/) 🔥 | [`virtualcam`](https://github.com/kamangir/blue-sandbox/blob/main/blue_sandbox/virtualcam) [![image](https://github.com/kamangir/assets/raw/main/blue-sandbox/virtualcam.png?raw=true)](https://github.com/kamangir/blue-sandbox/blob/main/blue_sandbox/virtualcam) Python + [OBS Studio](https://obsproject.com/) ⏸️ | |
57
58
 
58
59
  ---
59
60
 
60
61
 
61
62
  [![pylint](https://github.com/kamangir/blue-sandbox/actions/workflows/pylint.yml/badge.svg)](https://github.com/kamangir/blue-sandbox/actions/workflows/pylint.yml) [![pytest](https://github.com/kamangir/blue-sandbox/actions/workflows/pytest.yml/badge.svg)](https://github.com/kamangir/blue-sandbox/actions/workflows/pytest.yml) [![bashtest](https://github.com/kamangir/blue-sandbox/actions/workflows/bashtest.yml/badge.svg)](https://github.com/kamangir/blue-sandbox/actions/workflows/bashtest.yml) [![PyPI version](https://img.shields.io/pypi/v/blue-sandbox.svg)](https://pypi.org/project/blue-sandbox/) [![PyPI - Downloads](https://img.shields.io/pypi/dd/blue-sandbox)](https://pypistats.org/packages/blue-sandbox)
62
63
 
63
- built by 🌀 [`blue_options-4.240.1`](https://github.com/kamangir/awesome-bash-cli), based on 🌀 [`blue_sandbox-5.348.1`](https://github.com/kamangir/blue-sandbox).
64
+ built by 🌀 [`blue_options-4.240.1`](https://github.com/kamangir/awesome-bash-cli), based on 🌀 [`blue_sandbox-5.362.1`](https://github.com/kamangir/blue-sandbox).
64
65
 
65
66
  built by 🌀 [`blueness-3.96.1`](https://github.com/kamangir/blueness).
@@ -8,11 +8,11 @@ pip install blue-sandbox
8
8
 
9
9
  | | | |
10
10
  | --- | --- | --- |
11
- | [`virtualcam`](./blue_sandbox/virtualcam) [![image](https://github.com/kamangir/assets/raw/main/blue-sandbox/virtualcam.png?raw=true)](./blue_sandbox/virtualcam) Python + [OBS Studio](https://obsproject.com/) ⏸️ | | |
11
+ | [`WebDAV`](./blue_sandbox/WebDAV) [![image](https://github.com/kamangir/assets/raw/main/blue-sandbox/WebDAV.png?raw=true)](./blue_sandbox/WebDAV) An interface to [WebDAV](http://www.webdav.org/) 🔥 | [`virtualcam`](./blue_sandbox/virtualcam) [![image](https://github.com/kamangir/assets/raw/main/blue-sandbox/virtualcam.png?raw=true)](./blue_sandbox/virtualcam) Python + [OBS Studio](https://obsproject.com/) ⏸️ | |
12
12
 
13
13
  ---
14
14
 
15
15
 
16
16
  [![pylint](https://github.com/kamangir/blue-sandbox/actions/workflows/pylint.yml/badge.svg)](https://github.com/kamangir/blue-sandbox/actions/workflows/pylint.yml) [![pytest](https://github.com/kamangir/blue-sandbox/actions/workflows/pytest.yml/badge.svg)](https://github.com/kamangir/blue-sandbox/actions/workflows/pytest.yml) [![bashtest](https://github.com/kamangir/blue-sandbox/actions/workflows/bashtest.yml/badge.svg)](https://github.com/kamangir/blue-sandbox/actions/workflows/bashtest.yml) [![PyPI version](https://img.shields.io/pypi/v/blue-sandbox.svg)](https://pypi.org/project/blue-sandbox/) [![PyPI - Downloads](https://img.shields.io/pypi/dd/blue-sandbox)](https://pypistats.org/packages/blue-sandbox)
17
17
 
18
- built by 🌀 [`blue_options-4.240.1`](https://github.com/kamangir/awesome-bash-cli), based on 🌀 [`blue_sandbox-5.348.1`](https://github.com/kamangir/blue-sandbox).
18
+ built by 🌀 [`blue_options-4.240.1`](https://github.com/kamangir/awesome-bash-cli), based on 🌀 [`blue_sandbox-5.362.1`](https://github.com/kamangir/blue-sandbox).
@@ -7,6 +7,12 @@ from blue_sandbox import NAME, VERSION, ICON, REPO_NAME
7
7
 
8
8
  items = README.Items(
9
9
  [
10
+ {
11
+ "name": "WebDAV",
12
+ "url": "./blue_sandbox/WebDAV",
13
+ "marquee": "https://github.com/kamangir/assets/raw/main/blue-sandbox/WebDAV.png?raw=true",
14
+ "description": "An interface to [WebDAV](http://www.webdav.org/) 🔥",
15
+ },
10
16
  {
11
17
  "name": "virtualcam",
12
18
  "url": "./blue_sandbox/virtualcam",
@@ -14,7 +20,6 @@ items = README.Items(
14
20
  "description": "Python + [OBS Studio](https://obsproject.com/) ⏸️",
15
21
  },
16
22
  {},
17
- {},
18
23
  ]
19
24
  )
20
25
 
@@ -0,0 +1 @@
1
+ from blue_sandbox.WebDAV.interface import WebDAVInterface
@@ -0,0 +1,104 @@
1
+ from webdav3.client import Client
2
+
3
+ from blueness import module
4
+
5
+ from blue_sandbox import NAME
6
+ from blue_sandbox import env
7
+ from blue_sandbox.logger import logger
8
+
9
+ NAME = module.name(__file__, NAME)
10
+
11
+
12
+ # https://chatgpt.com/c/67e06812-4af0-8005-b2ab-5f9a1eabbbe3
13
+ class WebDAVInterface:
14
+ def __init__(self):
15
+ config = {
16
+ "webdav_hostname": env.WEBDAV_HOSTNAME,
17
+ "webdav_login": env.WEBDAV_LOGIN,
18
+ "webdav_password": env.WEBDAV_PASSWORD,
19
+ }
20
+
21
+ self.client = Client(config)
22
+
23
+ def ensure_remote_directory(
24
+ self,
25
+ path: str,
26
+ log: bool = True,
27
+ ) -> bool:
28
+ try:
29
+ if self.client.check(path):
30
+ return True
31
+
32
+ self.client.mkdir(path)
33
+ except Exception as e:
34
+ logger.error(e)
35
+ return False
36
+
37
+ if log:
38
+ logger.info(
39
+ "{}.ensure_remote_directory: created {}".format(
40
+ NAME,
41
+ path,
42
+ )
43
+ )
44
+
45
+ return True
46
+
47
+ def upload(
48
+ self,
49
+ local_path: str,
50
+ remote_path: str,
51
+ log: bool = True,
52
+ ) -> bool:
53
+ remote_dir = "/".join(remote_path.split("/")[:-1])
54
+ if not self.ensure_remote_directory(
55
+ path=remote_dir,
56
+ log=log,
57
+ ):
58
+ return False
59
+
60
+ try:
61
+ self.client.upload_sync(
62
+ remote_path=remote_path,
63
+ local_path=local_path,
64
+ )
65
+ except Exception as e:
66
+ logger.error(e)
67
+ return False
68
+
69
+ if log:
70
+ logger.info(
71
+ "{}.upload: {} -> {}".format(
72
+ NAME,
73
+ local_path,
74
+ remote_path,
75
+ )
76
+ )
77
+
78
+ return True
79
+
80
+ def download(
81
+ self,
82
+ remote_path: str,
83
+ local_path: str,
84
+ log: bool = True,
85
+ ) -> bool:
86
+ try:
87
+ self.client.download_sync(
88
+ remote_path=remote_path,
89
+ local_path=local_path,
90
+ )
91
+ except Exception as e:
92
+ logger.error(e)
93
+ return False
94
+
95
+ if log:
96
+ logger.info(
97
+ "{}.download {} -> {}".format(
98
+ NAME,
99
+ remote_path,
100
+ local_path,
101
+ )
102
+ )
103
+
104
+ return True
@@ -4,7 +4,7 @@ ICON = "🌀"
4
4
 
5
5
  DESCRIPTION = f"{ICON} A sandbox for ideas and experiments."
6
6
 
7
- VERSION = "5.348.1"
7
+ VERSION = "5.362.1"
8
8
 
9
9
  REPO_NAME = "blue-sandbox"
10
10
 
@@ -0,0 +1,25 @@
1
+ from blue_options.env import load_config, load_env, get_env
2
+
3
+ load_env(__name__)
4
+ load_config(__name__)
5
+
6
+
7
+ DAMAGES_TEST_DATASET_OBJECT_NAME = get_env("DAMAGES_TEST_DATASET_OBJECT_NAME")
8
+
9
+ ENCODED_BLOB_SAS_TOKEN = get_env("ENCODED_BLOB_SAS_TOKEN")
10
+
11
+ SAGESEMSEG_COMPLETED_JOB_pascal_voc_v1_debug_v2 = get_env(
12
+ "SAGESEMSEG_COMPLETED_JOB_pascal_voc_v1_debug_v2"
13
+ )
14
+
15
+ SAGESEMSEG_COMPLETED_JOB_pascal_voc_v1_full_v2 = get_env(
16
+ "SAGESEMSEG_COMPLETED_JOB_pascal_voc_v1_full_v2"
17
+ )
18
+
19
+ GROQ_API_KEY = get_env("GROQ_API_KEY", "")
20
+
21
+ VISUALYZE_PORT = get_env("VISUALYZE_PORT")
22
+
23
+ WEBDAV_HOSTNAME = get_env("WEBDAV_HOSTNAME")
24
+ WEBDAV_LOGIN = get_env("WEBDAV_LOGIN")
25
+ WEBDAV_PASSWORD = get_env("WEBDAV_PASSWORD")
@@ -0,0 +1,6 @@
1
+ ENCODED_BLOB_SAS_TOKEN=value
2
+ GROQ_API_KEY=
3
+
4
+ WEBDAV_HOSTNAME=
5
+ WEBDAV_LOGIN=
6
+ WEBDAV_PASSWORD=
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: blue_sandbox
3
- Version: 5.348.1
3
+ Version: 5.362.1
4
4
  Summary: 🌀 A sandbox for ideas and experiments.
5
5
  Home-page: https://github.com/kamangir/blue-sandbox
6
6
  Author: Arash Abadpour (Kamangir)
@@ -32,6 +32,7 @@ Requires-Dist: pylint
32
32
  Requires-Dist: pytest
33
33
  Requires-Dist: python-dotenv[cli]
34
34
  Requires-Dist: tqdm
35
+ Requires-Dist: webdavclient3
35
36
  Dynamic: author
36
37
  Dynamic: author-email
37
38
  Dynamic: classifier
@@ -53,13 +54,13 @@ pip install blue-sandbox
53
54
 
54
55
  | | | |
55
56
  | --- | --- | --- |
56
- | [`virtualcam`](https://github.com/kamangir/blue-sandbox/blob/main/blue_sandbox/virtualcam) [![image](https://github.com/kamangir/assets/raw/main/blue-sandbox/virtualcam.png?raw=true)](https://github.com/kamangir/blue-sandbox/blob/main/blue_sandbox/virtualcam) Python + [OBS Studio](https://obsproject.com/) ⏸️ | | |
57
+ | [`WebDAV`](https://github.com/kamangir/blue-sandbox/blob/main/blue_sandbox/WebDAV) [![image](https://github.com/kamangir/assets/raw/main/blue-sandbox/WebDAV.png?raw=true)](https://github.com/kamangir/blue-sandbox/blob/main/blue_sandbox/WebDAV) An interface to [WebDAV](http://www.webdav.org/) 🔥 | [`virtualcam`](https://github.com/kamangir/blue-sandbox/blob/main/blue_sandbox/virtualcam) [![image](https://github.com/kamangir/assets/raw/main/blue-sandbox/virtualcam.png?raw=true)](https://github.com/kamangir/blue-sandbox/blob/main/blue_sandbox/virtualcam) Python + [OBS Studio](https://obsproject.com/) ⏸️ | |
57
58
 
58
59
  ---
59
60
 
60
61
 
61
62
  [![pylint](https://github.com/kamangir/blue-sandbox/actions/workflows/pylint.yml/badge.svg)](https://github.com/kamangir/blue-sandbox/actions/workflows/pylint.yml) [![pytest](https://github.com/kamangir/blue-sandbox/actions/workflows/pytest.yml/badge.svg)](https://github.com/kamangir/blue-sandbox/actions/workflows/pytest.yml) [![bashtest](https://github.com/kamangir/blue-sandbox/actions/workflows/bashtest.yml/badge.svg)](https://github.com/kamangir/blue-sandbox/actions/workflows/bashtest.yml) [![PyPI version](https://img.shields.io/pypi/v/blue-sandbox.svg)](https://pypi.org/project/blue-sandbox/) [![PyPI - Downloads](https://img.shields.io/pypi/dd/blue-sandbox)](https://pypistats.org/packages/blue-sandbox)
62
63
 
63
- built by 🌀 [`blue_options-4.240.1`](https://github.com/kamangir/awesome-bash-cli), based on 🌀 [`blue_sandbox-5.348.1`](https://github.com/kamangir/blue-sandbox).
64
+ built by 🌀 [`blue_options-4.240.1`](https://github.com/kamangir/awesome-bash-cli), based on 🌀 [`blue_sandbox-5.362.1`](https://github.com/kamangir/blue-sandbox).
64
65
 
65
66
  built by 🌀 [`blueness-3.96.1`](https://github.com/kamangir/blueness).
@@ -31,6 +31,8 @@ blue_sandbox/.abcli/assets/publish.sh
31
31
  blue_sandbox/.abcli/tests/README.sh
32
32
  blue_sandbox/.abcli/tests/help.sh
33
33
  blue_sandbox/.abcli/tests/version.sh
34
+ blue_sandbox/WebDAV/__init__.py
35
+ blue_sandbox/WebDAV/interface.py
34
36
  blue_sandbox/assets/__init__.py
35
37
  blue_sandbox/assets/__main__.py
36
38
  blue_sandbox/assets/functions.py
@@ -18,3 +18,4 @@ pylint
18
18
  pytest
19
19
  python-dotenv[cli]
20
20
  tqdm
21
+ webdavclient3
@@ -18,4 +18,7 @@ pyyaml
18
18
  pylint
19
19
  pytest
20
20
  python-dotenv[cli]
21
- tqdm
21
+ tqdm
22
+
23
+ # nodisk
24
+ webdavclient3
@@ -12,6 +12,7 @@ setup(
12
12
  f"{NAME}.assets",
13
13
  f"{NAME}.help",
14
14
  f"{NAME}.virtualcam",
15
+ f"{NAME}.WebDAV",
15
16
  ],
16
17
  include_package_data=True,
17
18
  package_data={
@@ -1,30 +0,0 @@
1
- import os
2
- from blue_options.env import load_config, load_env
3
-
4
- load_env(__name__)
5
- load_config(__name__)
6
-
7
-
8
- DAMAGES_TEST_DATASET_OBJECT_NAME = os.getenv(
9
- "DAMAGES_TEST_DATASET_OBJECT_NAME",
10
- "",
11
- )
12
-
13
- ENCODED_BLOB_SAS_TOKEN = os.getenv("ENCODED_BLOB_SAS_TOKEN", "")
14
-
15
- SAGESEMSEG_COMPLETED_JOB_pascal_voc_v1_debug_v2 = os.getenv(
16
- "SAGESEMSEG_COMPLETED_JOB_pascal_voc_v1_debug_v2",
17
- "",
18
- )
19
-
20
- SAGESEMSEG_COMPLETED_JOB_pascal_voc_v1_full_v2 = os.getenv(
21
- "SAGESEMSEG_COMPLETED_JOB_pascal_voc_v1_full_v2",
22
- "",
23
- )
24
-
25
- GROQ_API_KEY = os.getenv("GROQ_API_KEY", "")
26
-
27
- VISUALYZE_PORT = os.getenv(
28
- "VISUALYZE_PORT",
29
- "",
30
- )
@@ -1,2 +0,0 @@
1
- ENCODED_BLOB_SAS_TOKEN=value
2
- GROQ_API_KEY=
File without changes
File without changes