pyxecm 1.4__py3-none-any.whl → 1.5__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 pyxecm might be problematic. Click here for more details.

pyxecm/helper/__init__.py CHANGED
@@ -1,4 +1,6 @@
1
1
  """pyxecm helper classes, not for direct use"""
2
+
2
3
  from .assoc import Assoc
3
4
  from .web import HTTP
4
5
  from .xml import XML
6
+ from .data import Data
pyxecm/helper/assoc.py CHANGED
@@ -165,7 +165,19 @@ class Assoc:
165
165
  @classmethod
166
166
  def extract_substring(
167
167
  cls, input_string: str, start_sequence: str, stop_sequence: str
168
- ):
168
+ ) -> str | None:
169
+ """A generic method to extract a substring that is delimited
170
+ by a strart and stop sequence.
171
+
172
+ Args:
173
+ input_string (str): Input string to search the delimited substring in.
174
+ start_sequence (str): Start esequence of characters.
175
+ stop_sequence (str): Stopß sequence of characters
176
+
177
+ Returns:
178
+ str | None: the deliminated substring or None if not found.
179
+ """
180
+
169
181
  start_index = input_string.find(start_sequence)
170
182
  if start_index == -1:
171
183
  return None
@@ -179,6 +191,17 @@ class Assoc:
179
191
 
180
192
  @classmethod
181
193
  def extract_assoc_string(cls, input_string: str, is_escaped: bool = False) -> str:
194
+ """Extract an Assoc from a string. The assoc is deliminated by A< ... >.
195
+
196
+ Args:
197
+ input_string (str): Input string that includes the Assoc as a substring.
198
+ is_escaped (bool, optional): Whether or not the input string includes the
199
+ assoc escaped or not.
200
+
201
+ Returns:
202
+ str: the assoc string
203
+ """
204
+
182
205
  if is_escaped:
183
206
  assoc_string = cls.extract_substring(input_string, "A&lt;", "&gt;")
184
207
  else: