abstract-utilities 0.2.2.443__py3-none-any.whl → 0.2.2.444__py3-none-any.whl

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 abstract-utilities might be problematic. Click here for more details.

@@ -13,7 +13,8 @@ Usage:
13
13
  """
14
14
 
15
15
  import os
16
-
16
+ from .ssh_utils import run_cmd
17
+ from .abstract_classes import run_pruned_func
17
18
  _FILE_PATH_KEYS = ['file', 'filepath', 'file_path', 'path', 'directory', 'f', 'dst', 'dest']
18
19
  _CONTENTS_KEYS = ['cont', 'content', 'contents', 'data', 'datas', 'dat', 'src', 'source']
19
20
 
@@ -90,7 +91,13 @@ def write_to_file(*args, **kwargs):
90
91
  return file_path
91
92
 
92
93
 
93
- def read_from_file(file_path):
94
+ def read_from_file(file_path,**kwargs):
95
+ user_at_host = kwargs.get("user_at_host")
96
+ if user_at_host:
97
+ kwargs["cwd"] = kwargs.get('cwd') or os.path.dirname(file_path)
98
+ basename = os.path.basename(file_path)
99
+ kwargs["cmd"] = f'cat {basename}'
100
+ return run_pruned_func(run_cmd,**kwargs)
94
101
  """Read text content from a file."""
95
102
  with open(file_path, "r", encoding="utf-8") as f:
96
103
  return f.read()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: abstract_utilities
3
- Version: 0.2.2.443
3
+ Version: 0.2.2.444
4
4
  Summary: abstract_utilities is a collection of utility modules providing a variety of functions to aid in tasks such as data comparison, list manipulation, JSON handling, string manipulation, mathematical computations, and time operations.
5
5
  Home-page: https://github.com/AbstractEndeavors/abstract_utilities
6
6
  Author: putkoff
@@ -14,7 +14,7 @@ abstract_utilities/log_utils.py,sha256=W74Y-CmdQP4Kj88HmAgejVxWgyWlvgCKMwLvOfyFf
14
14
  abstract_utilities/math_utils.py,sha256=0o1ls1En03UAkYmxTBildCCJDfHygmNuvVnrNrLYtK0,6578
15
15
  abstract_utilities/parse_utils.py,sha256=Z5OGRwHuzCzY91fz0JJojk1BPAo1XF2quNNLuBF4_Vk,18602
16
16
  abstract_utilities/path_utils.py,sha256=X_U9cPBbNu5Wi0F3hQE0gXQX1gfhzxhxALbairTEOZU,19252
17
- abstract_utilities/read_write_utils.py,sha256=EV4r8nlLKxtpukR9xRZBk49HGRyLHOg8QvdGjALQ1BM,4102
17
+ abstract_utilities/read_write_utils.py,sha256=jLDySxElwIp9aaqPoVWSrAe0MmIjV-yotnCIdkJ_XmI,4464
18
18
  abstract_utilities/safe_utils.py,sha256=_uoZny6dJjopVakOiaf0UIZcvRRXMh51FpfDUooe0xY,3733
19
19
  abstract_utilities/string_clean.py,sha256=-gY9i2yqjX5UClvSaKsSrzA4GjR7eaNI3GnFjZpt2bo,5923
20
20
  abstract_utilities/tetsts.py,sha256=PrejTUew5dAAqNb4erMJwfdSHxDyuuHGWY2fMlWk5hk,21
@@ -76,7 +76,7 @@ abstract_utilities/ssh_utils/classes.py,sha256=3Q9BfLpyagNFYyiF4bt-5UCezeUJv9NK9
76
76
  abstract_utilities/ssh_utils/imports.py,sha256=7-pVJK1RfR0KiZsv0mNYGPuNXA4iYqmDvqbAR9h1llU,371
77
77
  abstract_utilities/ssh_utils/pexpect_utils.py,sha256=JBdOIXBTXAqE5TrsFjmPWJgwSaWyRJN8rbJ6y3_zKPY,10556
78
78
  abstract_utilities/ssh_utils/utils.py,sha256=smUWAx3nW1h0etTndJ_te9bkUX5YzQ8kYd9_gD1TXLk,4882
79
- abstract_utilities-0.2.2.443.dist-info/METADATA,sha256=5G8OND-LN_2ONjiff886rN1e44ZcpcLEiBMI9PBCtTM,28108
80
- abstract_utilities-0.2.2.443.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
81
- abstract_utilities-0.2.2.443.dist-info/top_level.txt,sha256=BF0GZ0xVFfN1K-hFIWPO3viNsOs1sSF86n1vHBg39FM,19
82
- abstract_utilities-0.2.2.443.dist-info/RECORD,,
79
+ abstract_utilities-0.2.2.444.dist-info/METADATA,sha256=GD615tEJs-NJ2arQkCXjyAsQKUDRqp5wm_BWO1Z1uFA,28108
80
+ abstract_utilities-0.2.2.444.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
81
+ abstract_utilities-0.2.2.444.dist-info/top_level.txt,sha256=BF0GZ0xVFfN1K-hFIWPO3viNsOs1sSF86n1vHBg39FM,19
82
+ abstract_utilities-0.2.2.444.dist-info/RECORD,,