osbot-utils 1.95.0__py3-none-any.whl → 2.1.0__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.
Files changed (61) hide show
  1. osbot_utils/base_classes/Kwargs_To_Self.py +1 -1
  2. osbot_utils/context_managers/capture_duration.py +2 -2
  3. osbot_utils/decorators/methods/type_safe.py +1 -1
  4. osbot_utils/helpers/CFormat.py +1 -1
  5. osbot_utils/helpers/Hashicorp_Secrets.py +1 -1
  6. osbot_utils/helpers/Zip_Bytes.py +1 -1
  7. osbot_utils/helpers/cache_requests/Cache__Requests__Actions.py +1 -1
  8. osbot_utils/helpers/cache_requests/Cache__Requests__Config.py +1 -1
  9. osbot_utils/helpers/cache_requests/Cache__Requests__Data.py +1 -1
  10. osbot_utils/helpers/cache_requests/Cache__Requests__Invoke.py +1 -1
  11. osbot_utils/helpers/cache_requests/Cache__Requests__Row.py +1 -1
  12. osbot_utils/helpers/cache_requests/Cache__Requests__Table.py +1 -1
  13. osbot_utils/helpers/flows/Flow.py +1 -1
  14. osbot_utils/helpers/flows/Flow__Events.py +1 -1
  15. osbot_utils/helpers/flows/Task.py +1 -1
  16. osbot_utils/helpers/flows/models/Flow_Run__Config.py +1 -1
  17. osbot_utils/helpers/flows/models/Flow_Run__Event.py +1 -1
  18. osbot_utils/helpers/flows/models/Flow_Run__Event_Data.py +1 -1
  19. osbot_utils/helpers/flows/models/Flow_Run__Event_Type.py +1 -1
  20. osbot_utils/helpers/generators/Generator_Manager.py +1 -1
  21. osbot_utils/helpers/generators/Model__Generator_Target.py +1 -1
  22. osbot_utils/helpers/pubsub/Event__Queue.py +1 -1
  23. osbot_utils/helpers/sqlite/Sqlite__Database.py +1 -1
  24. osbot_utils/helpers/sqlite/cache/Sqlite__Cache__Requests.py +1 -1
  25. osbot_utils/helpers/sqlite/cache/Sqlite__Cache__Requests__Sqlite.py +1 -1
  26. osbot_utils/helpers/ssh/SSH.py +1 -1
  27. osbot_utils/helpers/ssh/SSH__Execute.py +1 -1
  28. osbot_utils/helpers/ssh/SSH__Python.py +1 -1
  29. osbot_utils/helpers/trace/Trace_Call__Config.py +1 -1
  30. osbot_utils/helpers/xml/Xml__Attribute.py +1 -1
  31. osbot_utils/helpers/xml/Xml__Element.py +1 -1
  32. osbot_utils/helpers/xml/Xml__File.py +1 -1
  33. osbot_utils/helpers/xml/Xml__File__Load.py +1 -1
  34. osbot_utils/helpers/xml/Xml__File__To_Dict.py +1 -1
  35. osbot_utils/helpers/xml/Xml__File__To_Xml.py +1 -1
  36. osbot_utils/helpers/xml/rss/RSS__Channel.py +1 -1
  37. osbot_utils/helpers/xml/rss/RSS__Enclosure.py +1 -1
  38. osbot_utils/helpers/xml/rss/RSS__Feed.py +1 -1
  39. osbot_utils/helpers/xml/rss/RSS__Image.py +1 -1
  40. osbot_utils/helpers/xml/rss/RSS__Item.py +1 -1
  41. osbot_utils/testing/Temp_Env_Vars.py +1 -1
  42. osbot_utils/{base_classes → type_safe}/Type_Safe.py +9 -9
  43. osbot_utils/{base_classes → type_safe}/Type_Safe__Base.py +3 -0
  44. osbot_utils/type_safe/Type_Safe__Dict.py +39 -0
  45. osbot_utils/type_safe/Type_Safe__List.py +34 -0
  46. osbot_utils/{helpers/type_safe → type_safe}/validators/Validator__Max.py +1 -1
  47. osbot_utils/{helpers/type_safe → type_safe}/validators/Validator__Min.py +1 -1
  48. osbot_utils/{helpers/type_safe → type_safe}/validators/Validator__One_Of.py +1 -1
  49. osbot_utils/{helpers/type_safe → type_safe}/validators/Validator__Regex.py +1 -1
  50. osbot_utils/utils/Python_Logger.py +1 -1
  51. osbot_utils/version +1 -1
  52. {osbot_utils-1.95.0.dist-info → osbot_utils-2.1.0.dist-info}/METADATA +2 -2
  53. {osbot_utils-1.95.0.dist-info → osbot_utils-2.1.0.dist-info}/RECORD +59 -59
  54. osbot_utils/base_classes/Type_Safe__Dict.py +0 -22
  55. osbot_utils/base_classes/Type_Safe__List.py +0 -22
  56. /osbot_utils/{helpers → type_safe}/Type_Safe_Method.py +0 -0
  57. /osbot_utils/{helpers/type_safe → type_safe}/Type_Safe__Validator.py +0 -0
  58. /osbot_utils/{helpers/type_safe → type_safe}/__init__.py +0 -0
  59. /osbot_utils/{helpers/type_safe → type_safe}/validators/__init__.py +0 -0
  60. {osbot_utils-1.95.0.dist-info → osbot_utils-2.1.0.dist-info}/LICENSE +0 -0
  61. {osbot_utils-1.95.0.dist-info → osbot_utils-2.1.0.dist-info}/WHEEL +0 -0
@@ -1,4 +1,4 @@
1
- from osbot_utils.base_classes.Type_Safe import Type_Safe
1
+ from osbot_utils.type_safe.Type_Safe import Type_Safe
2
2
 
3
3
  # todo: refactor all of Kwargs_To_Self to use Type_Safe
4
4
  Kwargs_To_Self = Type_Safe
@@ -1,5 +1,5 @@
1
- from osbot_utils.base_classes.Type_Safe import Type_Safe
2
- from osbot_utils.utils.Misc import timestamp_utc_now
1
+ from osbot_utils.type_safe.Type_Safe import Type_Safe
2
+ from osbot_utils.utils.Misc import timestamp_utc_now
3
3
 
4
4
 
5
5
  class capture_duration(Type_Safe):
@@ -1,5 +1,5 @@
1
1
  import functools # For wrapping functions
2
- from osbot_utils.helpers.Type_Safe_Method import Type_Safe_Method
2
+ from osbot_utils.type_safe.Type_Safe_Method import Type_Safe_Method
3
3
 
4
4
  def type_safe(func): # Main decorator function
5
5
  @functools.wraps(func) # Preserve function metadata
@@ -2,7 +2,7 @@
2
2
  # - Have code complete on CPrint
3
3
  # - not have the write the code for each of the methods
4
4
  # - have a good and logical place to capture the ID of the color
5
- from osbot_utils.base_classes.Type_Safe import Type_Safe
5
+ from osbot_utils.type_safe.Type_Safe import Type_Safe
6
6
 
7
7
 
8
8
  class CFormat_Colors:
@@ -1,5 +1,5 @@
1
1
  from osbot_utils.utils.Env import get_env
2
- from osbot_utils.base_classes.Type_Safe import Type_Safe
2
+ from osbot_utils.type_safe.Type_Safe import Type_Safe
3
3
  from osbot_utils.utils.Lists import list_index_by
4
4
  from osbot_utils.utils.Misc import list_set
5
5
 
@@ -1,4 +1,4 @@
1
- from osbot_utils.base_classes.Type_Safe import Type_Safe
1
+ from osbot_utils.type_safe.Type_Safe import Type_Safe
2
2
  from osbot_utils.utils.Dev import pprint
3
3
  from osbot_utils.utils.Files import files_list, file_create_from_bytes, temp_file, parent_folder, parent_folder_create
4
4
  from osbot_utils.utils.Misc import random_text
@@ -1,4 +1,4 @@
1
- from osbot_utils.base_classes.Type_Safe import Type_Safe
1
+ from osbot_utils.type_safe.Type_Safe import Type_Safe
2
2
  from osbot_utils.helpers.cache_requests.Cache__Requests__Row import Cache__Requests__Row
3
3
  from osbot_utils.helpers.cache_requests.Cache__Requests__Table import Cache__Requests__Table
4
4
  from osbot_utils.utils.Json import json_dumps
@@ -1,4 +1,4 @@
1
- from osbot_utils.base_classes.Type_Safe import Type_Safe
1
+ from osbot_utils.type_safe.Type_Safe import Type_Safe
2
2
 
3
3
 
4
4
  class Cache__Requests__Config(Type_Safe):
@@ -1,5 +1,5 @@
1
1
  import types
2
- from osbot_utils.base_classes.Type_Safe import Type_Safe
2
+ from osbot_utils.type_safe.Type_Safe import Type_Safe
3
3
  from osbot_utils.helpers.cache_requests.Cache__Requests__Config import Cache__Requests__Config
4
4
  from osbot_utils.helpers.cache_requests.Cache__Requests__Table import Cache__Requests__Table
5
5
  from osbot_utils.utils.Json import json_dumps, json_loads
@@ -1,7 +1,7 @@
1
1
  import threading
2
2
  import types
3
3
 
4
- from osbot_utils.base_classes.Type_Safe import Type_Safe
4
+ from osbot_utils.type_safe.Type_Safe import Type_Safe
5
5
  from osbot_utils.helpers.cache_requests.Cache__Requests__Actions import Cache__Requests__Actions
6
6
  from osbot_utils.helpers.cache_requests.Cache__Requests__Config import Cache__Requests__Config
7
7
  from osbot_utils.helpers.cache_requests.Cache__Requests__Data import Cache__Requests__Data
@@ -1,4 +1,4 @@
1
- from osbot_utils.base_classes.Type_Safe import Type_Safe
1
+ from osbot_utils.type_safe.Type_Safe import Type_Safe
2
2
  from osbot_utils.helpers.cache_requests.Cache__Requests__Config import Cache__Requests__Config
3
3
  from osbot_utils.helpers.cache_requests.Cache__Requests__Table import Cache__Requests__Table
4
4
  from osbot_utils.utils.Json import json_dumps
@@ -1,4 +1,4 @@
1
- from osbot_utils.base_classes.Type_Safe import Type_Safe
1
+ from osbot_utils.type_safe.Type_Safe import Type_Safe
2
2
 
3
3
 
4
4
  class Cache__Requests__Table(Type_Safe):
@@ -3,7 +3,7 @@ import logging
3
3
  import typing
4
4
 
5
5
  from osbot_utils.helpers.Dependency_Manager import Dependency_Manager
6
- from osbot_utils.base_classes.Type_Safe import Type_Safe
6
+ from osbot_utils.type_safe.Type_Safe import Type_Safe
7
7
  from osbot_utils.helpers.CFormat import CFormat, f_dark_grey, f_magenta, f_bold
8
8
  from osbot_utils.helpers.flows.models.Flow_Run__Config import Flow_Run__Config
9
9
  from osbot_utils.helpers.flows.Flow__Events import flow_events
@@ -1,6 +1,6 @@
1
1
  from osbot_utils.helpers.flows.models.Flow_Run__Event_Data import Flow_Run__Event_Data
2
2
  from osbot_utils.utils.Str import ansi_to_text
3
- from osbot_utils.base_classes.Type_Safe import Type_Safe
3
+ from osbot_utils.type_safe.Type_Safe import Type_Safe
4
4
  from osbot_utils.helpers.flows.models.Flow_Run__Event import Flow_Run__Event
5
5
  from osbot_utils.helpers.flows.models.Flow_Run__Event_Type import Flow_Run__Event_Type
6
6
 
@@ -8,7 +8,7 @@ from osbot_utils.helpers.Dependency_Manager import Dependency_Manager
8
8
  from osbot_utils.helpers.flows.Flow__Events import flow_events
9
9
  from osbot_utils.testing.Stdout import Stdout
10
10
  from osbot_utils.helpers.CFormat import CFormat, f_dark_grey, f_red, f_blue, f_bold
11
- from osbot_utils.base_classes.Type_Safe import Type_Safe
11
+ from osbot_utils.type_safe.Type_Safe import Type_Safe
12
12
  from osbot_utils.helpers.flows.Flow import Flow
13
13
 
14
14
  TASK__RANDOM_ID__PREFIX = 'task_id__'
@@ -1,4 +1,4 @@
1
- from osbot_utils.base_classes.Type_Safe import Type_Safe
1
+ from osbot_utils.type_safe.Type_Safe import Type_Safe
2
2
 
3
3
 
4
4
  class Flow_Run__Config(Type_Safe):
@@ -1,6 +1,6 @@
1
1
  from osbot_utils.helpers.Random_Guid import Random_Guid
2
2
 
3
- from osbot_utils.base_classes.Type_Safe import Type_Safe
3
+ from osbot_utils.type_safe.Type_Safe import Type_Safe
4
4
  from osbot_utils.helpers.Timestamp_Now import Timestamp_Now
5
5
  from osbot_utils.helpers.flows.models.Flow_Run__Event_Data import Flow_Run__Event_Data
6
6
  from osbot_utils.helpers.flows.models.Flow_Run__Event_Type import Flow_Run__Event_Type
@@ -1,6 +1,6 @@
1
1
  import logging
2
2
 
3
- from osbot_utils.base_classes.Type_Safe import Type_Safe
3
+ from osbot_utils.type_safe.Type_Safe import Type_Safe
4
4
 
5
5
 
6
6
  class Flow_Run__Event_Data(Type_Safe):
@@ -1,6 +1,6 @@
1
1
  from enum import Enum
2
2
 
3
- from osbot_utils.base_classes.Type_Safe import Type_Safe
3
+ from osbot_utils.type_safe.Type_Safe import Type_Safe
4
4
 
5
5
  class Flow_Run__Event_Type(Enum):
6
6
  FLOW_MESSAGE: str = 'flow_message'
@@ -3,7 +3,7 @@ from _thread import RLock
3
3
  from types import GeneratorType
4
4
  from typing import Dict # Typing imports for type hints
5
5
  from typing import Union
6
- from osbot_utils.base_classes.Type_Safe import Type_Safe # Type_Safe base class for type-safe attributes
6
+ from osbot_utils.type_safe.Type_Safe import Type_Safe # Type_Safe base class for type-safe attributes
7
7
  from osbot_utils.helpers.Random_Guid import Random_Guid # Helper for generating unique IDs
8
8
  from osbot_utils.helpers.generators.Generator_Context_Manager import Generator_Context_Manager
9
9
  from osbot_utils.helpers.generators.Model__Generator_State import Model__Generator_State
@@ -1,5 +1,5 @@
1
1
  from types import GeneratorType
2
- from osbot_utils.base_classes.Type_Safe import Type_Safe
2
+ from osbot_utils.type_safe.Type_Safe import Type_Safe
3
3
  from osbot_utils.helpers.Random_Guid import Random_Guid
4
4
  from osbot_utils.helpers.generators.Model__Generator_State import Model__Generator_State
5
5
 
@@ -1,7 +1,7 @@
1
1
  import time
2
2
  from queue import Queue, Empty
3
3
  from threading import Thread
4
- from osbot_utils.base_classes.Type_Safe import Type_Safe
4
+ from osbot_utils.type_safe.Type_Safe import Type_Safe
5
5
  from osbot_utils.helpers.pubsub.schemas.Schema__Event import Schema__Event
6
6
  from osbot_utils.helpers.pubsub.schemas.Schema__Event__Message import Schema__Event__Message
7
7
  from osbot_utils.utils.Misc import random_text, timestamp_utc_now, random_guid
@@ -1,4 +1,4 @@
1
- from osbot_utils.base_classes.Type_Safe import Type_Safe
1
+ from osbot_utils.type_safe.Type_Safe import Type_Safe
2
2
  from osbot_utils.decorators.methods.cache_on_self import cache_on_self
3
3
  from osbot_utils.utils.Files import current_temp_folder, path_combine, folder_create, file_exists, file_delete
4
4
  from osbot_utils.utils.Misc import random_filename
@@ -1,5 +1,5 @@
1
1
  import types
2
- from osbot_utils.base_classes.Type_Safe import Type_Safe
2
+ from osbot_utils.type_safe.Type_Safe import Type_Safe
3
3
  from osbot_utils.helpers.cache_requests.Cache__Requests__Actions import Cache__Requests__Actions
4
4
  from osbot_utils.helpers.cache_requests.Cache__Requests__Config import Cache__Requests__Config
5
5
  from osbot_utils.helpers.cache_requests.Cache__Requests__Data import Cache__Requests__Data
@@ -1,4 +1,4 @@
1
- from osbot_utils.base_classes.Type_Safe import Type_Safe
1
+ from osbot_utils.type_safe.Type_Safe import Type_Safe
2
2
  from osbot_utils.helpers.cache_requests.Cache__Requests__Config import Cache__Requests__Config
3
3
  from osbot_utils.helpers.sqlite.cache.Sqlite__DB__Requests import Sqlite__DB__Requests
4
4
 
@@ -1,5 +1,5 @@
1
1
  from osbot_utils.base_classes.Kwargs_To_Self import Kwargs_To_Self
2
- from osbot_utils.base_classes.Type_Safe import Type_Safe
2
+ from osbot_utils.type_safe.Type_Safe import Type_Safe
3
3
  from osbot_utils.decorators.methods.cache_on_self import cache_on_self
4
4
  from osbot_utils.helpers.ssh.SCP import SCP
5
5
  from osbot_utils.helpers.ssh.SSH__Execute import SSH__Execute
@@ -1,4 +1,4 @@
1
- from osbot_utils.base_classes.Type_Safe import Type_Safe
1
+ from osbot_utils.type_safe.Type_Safe import Type_Safe
2
2
  from osbot_utils.context_managers.capture_duration import capture_duration
3
3
  from osbot_utils.decorators.lists.group_by import group_by
4
4
  from osbot_utils.decorators.lists.index_by import index_by
@@ -1,4 +1,4 @@
1
- from osbot_utils.base_classes.Type_Safe import Type_Safe
1
+ from osbot_utils.type_safe.Type_Safe import Type_Safe
2
2
  from osbot_utils.helpers.ssh.SSH__Execute import SSH__Execute
3
3
  from osbot_utils.helpers.ssh.SSH__Linux import SSH__Linux
4
4
  from osbot_utils.utils.Dev import pprint
@@ -1,5 +1,5 @@
1
1
 
2
- from osbot_utils.base_classes.Type_Safe import Type_Safe
2
+ from osbot_utils.type_safe.Type_Safe import Type_Safe
3
3
  from osbot_utils.utils.Dev import pprint # todo: fix test requirement of mock to use this method
4
4
 
5
5
 
@@ -1,4 +1,4 @@
1
- from osbot_utils.base_classes.Type_Safe import Type_Safe
1
+ from osbot_utils.type_safe.Type_Safe import Type_Safe
2
2
 
3
3
 
4
4
  class Xml__Attribute(Type_Safe):
@@ -1,5 +1,5 @@
1
1
  from typing import Dict, List, Union
2
- from osbot_utils.base_classes.Type_Safe import Type_Safe
2
+ from osbot_utils.type_safe.Type_Safe import Type_Safe
3
3
  from osbot_utils.helpers.xml.Xml__Attribute import Xml__Attribute
4
4
 
5
5
  class XML__Element(Type_Safe):
@@ -1,5 +1,5 @@
1
1
  from typing import Dict
2
- from osbot_utils.base_classes.Type_Safe import Type_Safe
2
+ from osbot_utils.type_safe.Type_Safe import Type_Safe
3
3
  from osbot_utils.helpers.xml.Xml__Element import XML__Element
4
4
 
5
5
  class Xml__File(Type_Safe):
@@ -1,7 +1,7 @@
1
1
  from io import StringIO
2
2
  from typing import List, Union, Dict
3
3
  from xml.etree.ElementTree import iterparse, Element, fromstring, ParseError
4
- from osbot_utils.base_classes.Type_Safe import Type_Safe
4
+ from osbot_utils.type_safe.Type_Safe import Type_Safe
5
5
  from osbot_utils.helpers.xml.Xml__Attribute import Xml__Attribute
6
6
  from osbot_utils.helpers.xml.Xml__Element import XML__Element
7
7
  from osbot_utils.helpers.xml.Xml__File import Xml__File
@@ -1,5 +1,5 @@
1
1
  from typing import Dict, Any
2
- from osbot_utils.base_classes.Type_Safe import Type_Safe
2
+ from osbot_utils.type_safe.Type_Safe import Type_Safe
3
3
  from osbot_utils.helpers.xml.Xml__Element import XML__Element
4
4
  from osbot_utils.helpers.xml.Xml__File import Xml__File
5
5
 
@@ -1,7 +1,7 @@
1
1
  from typing import Optional
2
2
  from xml.etree.ElementTree import Element, SubElement, tostring
3
3
  from xml.dom import minidom
4
- from osbot_utils.base_classes.Type_Safe import Type_Safe
4
+ from osbot_utils.type_safe.Type_Safe import Type_Safe
5
5
  from osbot_utils.helpers.xml.Xml__Element import XML__Element
6
6
  from osbot_utils.helpers.xml.Xml__File import Xml__File
7
7
 
@@ -1,5 +1,5 @@
1
1
  from typing import Any, Dict, List
2
- from osbot_utils.base_classes.Type_Safe import Type_Safe
2
+ from osbot_utils.type_safe.Type_Safe import Type_Safe
3
3
  from osbot_utils.helpers.xml.rss.RSS__Image import RSS__Image
4
4
  from osbot_utils.helpers.xml.rss.RSS__Item import RSS__Item
5
5
 
@@ -1,4 +1,4 @@
1
- from osbot_utils.base_classes.Type_Safe import Type_Safe
1
+ from osbot_utils.type_safe.Type_Safe import Type_Safe
2
2
 
3
3
 
4
4
  class RSS__Enclosure(Type_Safe):
@@ -1,5 +1,5 @@
1
1
  from typing import Dict, Any
2
- from osbot_utils.base_classes.Type_Safe import Type_Safe
2
+ from osbot_utils.type_safe.Type_Safe import Type_Safe
3
3
  from osbot_utils.helpers.xml.rss.RSS__Channel import RSS__Channel
4
4
 
5
5
  DEFAULT__RSS_FEED__VERSION = "2.0"
@@ -1,4 +1,4 @@
1
- from osbot_utils.base_classes.Type_Safe import Type_Safe
1
+ from osbot_utils.type_safe.Type_Safe import Type_Safe
2
2
 
3
3
  class RSS__Image(Type_Safe):
4
4
  url : str
@@ -1,5 +1,5 @@
1
1
  from typing import Dict, List, Any
2
- from osbot_utils.base_classes.Type_Safe import Type_Safe
2
+ from osbot_utils.type_safe.Type_Safe import Type_Safe
3
3
  from osbot_utils.helpers.Guid import Guid
4
4
  from osbot_utils.helpers.xml.rss.RSS__Enclosure import RSS__Enclosure
5
5
 
@@ -1,5 +1,5 @@
1
1
  import os
2
- from osbot_utils.base_classes.Type_Safe import Type_Safe
2
+ from osbot_utils.type_safe.Type_Safe import Type_Safe
3
3
  from osbot_utils.utils.Env import del_env, set_env
4
4
 
5
5
 
@@ -84,11 +84,11 @@ class Type_Safe:
84
84
  raise AttributeError(f"'{type(self).__name__}' object has no attribute '{name}'") # Raise error if attribute is not a valid getter/setter
85
85
 
86
86
  def __setattr__(self, name, value):
87
- from osbot_utils.utils.Objects import convert_dict_to_value_from_obj_annotation
88
- from osbot_utils.utils.Objects import convert_to_value_from_obj_annotation
89
- from osbot_utils.utils.Objects import value_type_matches_obj_annotation_for_attr
90
- from osbot_utils.utils.Objects import value_type_matches_obj_annotation_for_union_and_annotated
91
- from osbot_utils.helpers.type_safe.Type_Safe__Validator import Type_Safe__Validator
87
+ from osbot_utils.utils.Objects import convert_dict_to_value_from_obj_annotation
88
+ from osbot_utils.utils.Objects import convert_to_value_from_obj_annotation
89
+ from osbot_utils.utils.Objects import value_type_matches_obj_annotation_for_attr
90
+ from osbot_utils.utils.Objects import value_type_matches_obj_annotation_for_union_and_annotated
91
+ from osbot_utils.type_safe.Type_Safe__Validator import Type_Safe__Validator
92
92
 
93
93
  annotations = all_annotations(self)
94
94
  if not annotations: # can't do type safety checks if the class does not have annotations
@@ -184,8 +184,8 @@ class Type_Safe:
184
184
  @classmethod
185
185
  def __default__value__(cls, var_type):
186
186
  import typing
187
- from osbot_utils.base_classes.Type_Safe__List import Type_Safe__List
188
- from osbot_utils.base_classes.Type_Safe__Dict import Type_Safe__Dict
187
+ from osbot_utils.type_safe.Type_Safe__List import Type_Safe__List
188
+ from osbot_utils.type_safe.Type_Safe__Dict import Type_Safe__Dict
189
189
 
190
190
  if var_type is typing.Set: # todo: refactor the dict, set and list logic, since they are 90% the same
191
191
  return set()
@@ -324,7 +324,7 @@ class Type_Safe:
324
324
  return value
325
325
 
326
326
  def deserialize_dict__using_key_value_annotations(self, key, value):
327
- from osbot_utils.base_classes.Type_Safe__Dict import Type_Safe__Dict
327
+ from osbot_utils.type_safe.Type_Safe__Dict import Type_Safe__Dict
328
328
 
329
329
  dict_annotations_tuple = get_args(self.__annotations__[key])
330
330
  if not dict_annotations_tuple: # happens when the value is a dict/Dict with no annotations
@@ -353,7 +353,7 @@ class Type_Safe:
353
353
  def deserialize_from_dict(self, data, raise_on_not_found=False):
354
354
  from decimal import Decimal
355
355
  from enum import EnumMeta
356
- from osbot_utils.base_classes.Type_Safe__List import Type_Safe__List
356
+ from osbot_utils.type_safe.Type_Safe__List import Type_Safe__List
357
357
  from osbot_utils.helpers.Random_Guid import Random_Guid
358
358
  from osbot_utils.helpers.Random_Guid_Short import Random_Guid_Short
359
359
  from osbot_utils.utils.Objects import obj_is_attribute_annotation_of_type
@@ -85,6 +85,9 @@ class Type_Safe__Base:
85
85
  actual_type_name = type_str(type(item))
86
86
  raise TypeError(f"Expected '{expected_type_name}', but got '{actual_type_name}'")
87
87
 
88
+ def json(self):
89
+ raise NotImplemented
90
+
88
91
  # todo: see if we should/can move this to the Objects.py file
89
92
  def type_str(tp):
90
93
  origin = get_origin(tp)
@@ -0,0 +1,39 @@
1
+ from osbot_utils.type_safe.Type_Safe__Base import type_str, Type_Safe__Base
2
+
3
+ class Type_Safe__Dict(Type_Safe__Base, dict):
4
+ def __init__(self, expected_key_type, expected_value_type, *args, **kwargs):
5
+ super().__init__(*args, **kwargs)
6
+
7
+ self.expected_key_type = expected_key_type
8
+ self.expected_value_type = expected_value_type
9
+
10
+ for k, v in self.items(): # check type-safety of ctor arguments
11
+ self.is_instance_of_type(k, self.expected_key_type )
12
+ self.is_instance_of_type(v, self.expected_value_type)
13
+
14
+ def __setitem__(self, key, value): # Check type-safety before allowing assignment.
15
+ self.is_instance_of_type(key, self.expected_key_type)
16
+ self.is_instance_of_type(value, self.expected_value_type)
17
+ super().__setitem__(key, value)
18
+
19
+ def __repr__(self):
20
+ key_type_name = type_str(self.expected_key_type)
21
+ value_type_name = type_str(self.expected_value_type)
22
+ return f"dict[{key_type_name}, {value_type_name}] with {len(self)} entries"
23
+
24
+ def json(self): # Convert the dictionary to a JSON-serializable format.
25
+ from osbot_utils.type_safe.Type_Safe import Type_Safe # can only import this here to avoid circular imports
26
+
27
+ result = {}
28
+ for key, value in self.items():
29
+ if isinstance(value, Type_Safe): # Handle Type_Safe objects in values
30
+ result[key] = value.json()
31
+ elif isinstance(value, (list, tuple)): # Handle lists/tuples that might contain Type_Safe objects
32
+ result[key] = [item.json() if isinstance(item, Type_Safe) else item
33
+ for item in value]
34
+ elif isinstance(value, dict): # Handle nested dictionaries that might contain Type_Safe objects
35
+ result[key] = {k: v.json() if isinstance(v, Type_Safe) else v
36
+ for k, v in value.items()}
37
+ else: # Regular values can be used as-is
38
+ result[key] = value
39
+ return result
@@ -0,0 +1,34 @@
1
+ from osbot_utils.type_safe.Type_Safe__Base import Type_Safe__Base, type_str
2
+
3
+ class Type_Safe__List(Type_Safe__Base, list):
4
+
5
+ def __init__(self, expected_type, *args):
6
+ super().__init__(*args)
7
+ self.expected_type = expected_type
8
+
9
+ def __repr__(self):
10
+ expected_type_name = type_str(self.expected_type)
11
+ return f"list[{expected_type_name}] with {len(self)} elements"
12
+
13
+ def append(self, item):
14
+ try:
15
+ self.is_instance_of_type(item, self.expected_type)
16
+ except TypeError as e:
17
+ raise TypeError(f"In Type_Safe__List: Invalid type for item: {e}")
18
+ super().append(item)
19
+
20
+
21
+ def json(self): # Convert the list to a JSON-serializable format.
22
+ from osbot_utils.type_safe.Type_Safe import Type_Safe # Import here to avoid circular imports
23
+
24
+ result = []
25
+ for item in self:
26
+ if isinstance(item, Type_Safe):
27
+ result.append(item.json())
28
+ elif isinstance(item, (list, tuple)):
29
+ result.append([x.json() if isinstance(x, Type_Safe) else x for x in item])
30
+ elif isinstance(item, dict):
31
+ result.append({k: v.json() if isinstance(v, Type_Safe) else v for k, v in item.items()})
32
+ else:
33
+ result.append(item)
34
+ return result
@@ -1,5 +1,5 @@
1
1
  from typing import Any
2
- from osbot_utils.helpers.type_safe.Type_Safe__Validator import Type_Safe__Validator
2
+ from osbot_utils.type_safe.Type_Safe__Validator import Type_Safe__Validator
3
3
 
4
4
 
5
5
  class Validator__Max(Type_Safe__Validator): # Validates that a numeric value is at most the specified maximum."""
@@ -1,5 +1,5 @@
1
1
  from typing import Any
2
- from osbot_utils.helpers.type_safe.Type_Safe__Validator import Type_Safe__Validator
2
+ from osbot_utils.type_safe.Type_Safe__Validator import Type_Safe__Validator
3
3
 
4
4
  class Validator__Min(Type_Safe__Validator): # Validates that a value is at least the specified minimum. Works with any type that supports the < operator (numbers, strings, lists, etc.)
5
5
  min_value: Any
@@ -1,5 +1,5 @@
1
1
  from typing import Any
2
- from osbot_utils.helpers.type_safe.Type_Safe__Validator import Type_Safe__Validator
2
+ from osbot_utils.type_safe.Type_Safe__Validator import Type_Safe__Validator
3
3
 
4
4
 
5
5
  class Validator__One_Of(Type_Safe__Validator): # Validates that a value is one of a set of allowed values."""
@@ -1,5 +1,5 @@
1
1
  from typing import Any
2
- from osbot_utils.helpers.type_safe.Type_Safe__Validator import Type_Safe__Validator
2
+ from osbot_utils.type_safe.Type_Safe__Validator import Type_Safe__Validator
3
3
 
4
4
  class Validator__Regex(Type_Safe__Validator): # Validates that a string matches the specified regex pattern.
5
5
  pattern : str
@@ -4,10 +4,10 @@ import sys
4
4
  import types
5
5
  from logging import Logger, StreamHandler, FileHandler
6
6
  from logging.handlers import MemoryHandler
7
- from osbot_utils.base_classes.Type_Safe import Type_Safe
8
7
  from osbot_utils.decorators.lists.group_by import group_by
9
8
  from osbot_utils.decorators.lists.index_by import index_by
10
9
  from osbot_utils.decorators.methods.cache_on_function import cache_on_function
10
+ from osbot_utils.type_safe.Type_Safe import Type_Safe
11
11
  from osbot_utils.utils.Misc import random_string
12
12
  from osbot_utils.utils.Files import temp_file
13
13
  from osbot_utils.utils.Objects import obj_dict
osbot_utils/version CHANGED
@@ -1 +1 @@
1
- v1.95.0
1
+ v2.1.0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: osbot_utils
3
- Version: 1.95.0
3
+ Version: 2.1.0
4
4
  Summary: OWASP Security Bot - Utils
5
5
  Home-page: https://github.com/owasp-sbot/OSBot-Utils
6
6
  License: MIT
@@ -23,7 +23,7 @@ Description-Content-Type: text/markdown
23
23
 
24
24
  Powerful Python util methods and classes that simplify common apis and tasks.
25
25
 
26
- ![Current Release](https://img.shields.io/badge/release-v1.95.0-blue)
26
+ ![Current Release](https://img.shields.io/badge/release-v2.1.0-blue)
27
27
  [![codecov](https://codecov.io/gh/owasp-sbot/OSBot-Utils/graph/badge.svg?token=GNVW0COX1N)](https://codecov.io/gh/owasp-sbot/OSBot-Utils)
28
28
 
29
29
 
@@ -1,15 +1,11 @@
1
1
  osbot_utils/__init__.py,sha256=DdJDmQc9zbQUlPVyTJOww6Ixrn9n4bD3ami5ItQfzJI,16
2
2
  osbot_utils/base_classes/Cache_Pickle.py,sha256=kPCwrgUbf_dEdxUz7vW1GuvIPwlNXxuRhb-H3AbSpII,5884
3
3
  osbot_utils/base_classes/Kwargs_To_Disk.py,sha256=HHoy05NC_w35WcT-OnSKoSIV_cLqaU9rdjH0_KNTM0E,1096
4
- osbot_utils/base_classes/Kwargs_To_Self.py,sha256=weFNsBfBNV9W_qBkN-IdBD4yYcJV_zgTxBRO-ZlcPS4,141
5
- osbot_utils/base_classes/Type_Safe.py,sha256=cfpLk3x0TQNeRMSRda91_DAO_m14_QtYcRrGMWZ8dmU,29076
6
- osbot_utils/base_classes/Type_Safe__Base.py,sha256=CFPYe8_i5vvTLyc7s8CXbY4n_dY6sqVfBY8w9Vo77ZA,5468
7
- osbot_utils/base_classes/Type_Safe__Dict.py,sha256=yB9dSNPh_PARqXhNLg1HBFXgMsB-o-PC7h-BUE8njg0,1106
8
- osbot_utils/base_classes/Type_Safe__List.py,sha256=pXDzJJttpEQQ9oTdsw7BykMB4VIX2rZzi1ZrnCzMZ8M,650
4
+ osbot_utils/base_classes/Kwargs_To_Self.py,sha256=3LRFpxdg9RBuUlIacF1Bwq014NXtJmB4U2dy9a69uY8,138
9
5
  osbot_utils/base_classes/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
10
6
  osbot_utils/context_managers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
11
7
  osbot_utils/context_managers/async_invoke.py,sha256=-ja3K8orLy8Of54CIYSK-zn443pOIDY2hnFBjVELrXc,829
12
- osbot_utils/context_managers/capture_duration.py,sha256=EhQUPHK_zjpm9dsnEhkJRrcd0fdngPgsM1QlNjquWwI,1147
8
+ osbot_utils/context_managers/capture_duration.py,sha256=Bqbak6iGgUvBoLpxPDvnXgUCtbGeuY93wI_2GC415lU,1153
13
9
  osbot_utils/context_managers/disable_root_loggers.py,sha256=0-zQk11TBqwhTHCN4vNhDApojtJ4oR0oMPRcwclcXZA,960
14
10
  osbot_utils/context_managers/print_duration.py,sha256=jleIYxmz-vbWbcZZPuTWMNavJgxYkATwrVk5H-2SHj4,272
15
11
  osbot_utils/decorators/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -33,16 +29,16 @@ osbot_utils/decorators/methods/function_type_check.py,sha256=o8Je6k-tXd3UmbgVL0g
33
29
  osbot_utils/decorators/methods/obj_as_context.py,sha256=59JgxUvEruh_4ROoWHXK22Jv8C4_E5mSxb4aG3JbL50,104
34
30
  osbot_utils/decorators/methods/remove_return_value.py,sha256=EerRwBFDJ3ICKA0BrNzelRECb3n2NUMoFzcn0rQyCUY,1162
35
31
  osbot_utils/decorators/methods/required_fields.py,sha256=PZd9LKd4qBeqxgP9FgTtLNNJ0coZx99hFJyNEKmF1K0,783
36
- osbot_utils/decorators/methods/type_safe.py,sha256=WtoDTRPcFV-EgSaNEawMj2plVq-zRlgR2tKPjGRgSqQ,1001
32
+ osbot_utils/decorators/methods/type_safe.py,sha256=yK1td-9WHFj2pe4dvBtw1cjYOE6z6-VnG5DCStGCO1c,1003
37
33
  osbot_utils/fluent/Fluent_Dict.py,sha256=nZ2z91s39sU2a-TLYpBirRoWgDXHrs0tQ9Bi_ZdKeW0,481
38
34
  osbot_utils/fluent/Fluent_List.py,sha256=PfDDC9sm16CFnNQ8gkhCEsmKcZp8iyQ0YBpSHvYssG8,1089
39
35
  osbot_utils/fluent/__init__.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
40
- osbot_utils/helpers/CFormat.py,sha256=1_XvqGwgU6qC97MbzcKF0o7s9mCXpU5Kq9Yf-1ixUwY,6808
36
+ osbot_utils/helpers/CFormat.py,sha256=QviXlx3cQF7Wq6bNQmvWPHknDDMQXg5bh5dsRncrg-U,6805
41
37
  osbot_utils/helpers/CPrint.py,sha256=ztKPNmT8BGxeyPXSQKRs63PqqbgxKDz_BiZmzFMup9g,1413
42
38
  osbot_utils/helpers/Dependency_Manager.py,sha256=79YRYnVfchewq8iSMJ5dzwW2D5u8chWcIqYE-G9YrSo,1337
43
39
  osbot_utils/helpers/Dict_To_Attr.py,sha256=NdhXl5mJH7-NaBk213amzc5Nfy3tJgW-N_uYIRE4hoc,208
44
40
  osbot_utils/helpers/Guid.py,sha256=fqiCYHrYff3yZ_Df-WJdXHl1RQtJHb4oCmDkJpcGN_k,828
45
- osbot_utils/helpers/Hashicorp_Secrets.py,sha256=zjXa_dQvfR9L1uoulWJ8nYYaDvznV6o_QPPS4zmb6mo,4235
41
+ osbot_utils/helpers/Hashicorp_Secrets.py,sha256=e2fWWHK6bubpAm1sw5y8X5kh2Hk5d4JyZCnUovZip5A,4232
46
42
  osbot_utils/helpers/Local_Cache.py,sha256=0JZZX3fFImcwtbBvxAQl-EbBegSNJRhRMYF6ovTH6zY,3141
47
43
  osbot_utils/helpers/Local_Caches.py,sha256=aQmi1HSM0TH6WQPedG2fbz4KCCJ3DQTU9d18rB1jR0M,1885
48
44
  osbot_utils/helpers/Print_Table.py,sha256=LEXbyqGg_6WSraI4cob4bNNSu18ddqvALp1zGK7bPhs,19126
@@ -54,8 +50,7 @@ osbot_utils/helpers/Safe_Id.py,sha256=0wPGd9eLzaOCYTSg9yEOal1kPsc8OI9khHkqEw9VQO
54
50
  osbot_utils/helpers/Str_ASCII.py,sha256=PRqyu449XnKrLn6b9Miii1Hv-GO5OAa1UhhgvlRcC2M,704
55
51
  osbot_utils/helpers/Timestamp_Now.py,sha256=k3-SUGYx2jLTXvgZYeECqPRJhVxqWPmW7co1l6r12jk,438
56
52
  osbot_utils/helpers/Type_Registry.py,sha256=Ajk3SyMSKDi2g9SJYUtTgg7PZkAgydaHcpbGuEN3S94,311
57
- osbot_utils/helpers/Type_Safe_Method.py,sha256=8E88of__An9_ZhJKz6Kp22C1mb9WLED0jWNLOII3fJs,10489
58
- osbot_utils/helpers/Zip_Bytes.py,sha256=6i6uD1TIcMZZRM8BYMseSnihRxUI2vJiai3UnPHrGrY,4290
53
+ osbot_utils/helpers/Zip_Bytes.py,sha256=Bf17NPS_yxrzI_4FsCxkjlhS9ELJK3kisY-jHQPQVgw,4287
59
54
  osbot_utils/helpers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
60
55
  osbot_utils/helpers/ast/Ast.py,sha256=lcPQOSxXI6zgmMnIVF9WM6ISqViWX-sq4d_UC0CDG8s,1155
61
56
  osbot_utils/helpers/ast/Ast_Base.py,sha256=5rHMupBlN_n6lOC31UnSW_lWqxqxaE31v0gn-t32OgQ,3708
@@ -133,30 +128,30 @@ osbot_utils/helpers/ast/nodes/Ast_With.py,sha256=MO3doSFTxQEXUm8t4wDG5hFfWa_ByOM
133
128
  osbot_utils/helpers/ast/nodes/Ast_With_Item.py,sha256=ger_t7_sEb2HiHpFwXBRAUJTCgXBfKZyv2uGuHMnQqA,260
134
129
  osbot_utils/helpers/ast/nodes/Ast_Yield.py,sha256=7ATJnOHekV9XquMTYYSJ6xqyDvgwFc596myKPpHLddk,197
135
130
  osbot_utils/helpers/ast/nodes/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
136
- osbot_utils/helpers/cache_requests/Cache__Requests__Actions.py,sha256=r1CMR4qHO9is66lexJQ-BNUmBWcEjOSTG_qC0xsoorY,1228
137
- osbot_utils/helpers/cache_requests/Cache__Requests__Config.py,sha256=KxBjj56YTjZjKsO9TLsRfkcHYJPIGDXZ6rFskaNnh-4,935
138
- osbot_utils/helpers/cache_requests/Cache__Requests__Data.py,sha256=W0t4HyRgTTBbykBf_Ui9o84xLPu5ivreB-jSdOct1lc,5504
139
- osbot_utils/helpers/cache_requests/Cache__Requests__Invoke.py,sha256=i8OiiA8afOnxVo_w9W8ySkMQygLAMMxDf3NAAmPCaE4,3348
140
- osbot_utils/helpers/cache_requests/Cache__Requests__Row.py,sha256=h-yc7NkpScbHwwf2km5wwKig-wLi4WuB9P4fVEdFGdM,3182
141
- osbot_utils/helpers/cache_requests/Cache__Requests__Table.py,sha256=RgxAYhm-FIrXXteQRtD91pOLq8JXhSzxb51Jb6MTUdY,391
131
+ osbot_utils/helpers/cache_requests/Cache__Requests__Actions.py,sha256=PnCJdNltS8GGHSjmUMLF2u7zRT3Ym8M7DIT3n9LkJlw,1225
132
+ osbot_utils/helpers/cache_requests/Cache__Requests__Config.py,sha256=cGjtPB-K_0Wk4bKbS26A3Rg2HAcBhWlMoZE0isBpRdc,932
133
+ osbot_utils/helpers/cache_requests/Cache__Requests__Data.py,sha256=cWVViRSVbS_V7AYxSjR91Wg1UYPi--zbzGmnAZ6t8n0,5501
134
+ osbot_utils/helpers/cache_requests/Cache__Requests__Invoke.py,sha256=q50s2Y6sGh33UcZjCSCi4ogHa49dsa39GW9gJY_Lvs8,3345
135
+ osbot_utils/helpers/cache_requests/Cache__Requests__Row.py,sha256=Sb7E_zDB-LPlWI8TiPRF99BmX_RYA3cheyCCf3c3Dfo,3179
136
+ osbot_utils/helpers/cache_requests/Cache__Requests__Table.py,sha256=BW7tXM0TFYma3Db4M-58IKpx0vevLuFsH7QQeiggPaI,388
142
137
  osbot_utils/helpers/cache_requests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
143
138
  osbot_utils/helpers/cache_requests/flows/flow__Cache__Requests.py,sha256=xgx_oExxkcvRwQN1UCobimECIMUKGoIX5oGdCmp8Nyw,243
144
- osbot_utils/helpers/flows/Flow.py,sha256=oaNYmCxqYC8DxX7egZDVo7Id4pqqcRymKTTlDmy8pGs,10965
145
- osbot_utils/helpers/flows/Flow__Events.py,sha256=_BHXh9v1GfvTI7hGx7eJDkCGeo9VjqDoCTMDeL09Ujc,2843
146
- osbot_utils/helpers/flows/Task.py,sha256=3PiU1GCWhnDcgYxYRldo0CWcCcnQDvWvU2cXPCmpSTc,5336
139
+ osbot_utils/helpers/flows/Flow.py,sha256=V4yVmnXB4oFwq3UtGF_7SPU5PmvNlowcQnqwAArP828,10962
140
+ osbot_utils/helpers/flows/Flow__Events.py,sha256=g7KBafFeA7tV-v31v_m3MT__cZEX63gh8CehnZwRYU0,2840
141
+ osbot_utils/helpers/flows/Task.py,sha256=tnO1q4nNnWYmcb66tMcKCOIgipAV-TCNO4xEtrnGDBc,5333
147
142
  osbot_utils/helpers/flows/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
148
143
  osbot_utils/helpers/flows/decorators/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
149
144
  osbot_utils/helpers/flows/decorators/flow.py,sha256=7wj5TtUO_ffbACnagZtZ6LfFgclmbQSfn2lKkMMrnJI,670
150
145
  osbot_utils/helpers/flows/decorators/task.py,sha256=9bhQBPJU1dO-J4FAsFkmxqQMBNtay4FT_b1BdpHJ9sA,734
151
- osbot_utils/helpers/flows/models/Flow_Run__Config.py,sha256=3JSPSG3vjM7mdnI-3wgLCc7Nc_3Xjqxn34_A6yUp-4Q,386
152
- osbot_utils/helpers/flows/models/Flow_Run__Event.py,sha256=-F_H_Tq119qa9tk8IoX5U36h_f8AE1VueL0olhjH24g,569
153
- osbot_utils/helpers/flows/models/Flow_Run__Event_Data.py,sha256=Xvv_vtOL-siSdt5nkRCLA7uHxlsA3bTm7ZD_EOkCVAU,405
154
- osbot_utils/helpers/flows/models/Flow_Run__Event_Type.py,sha256=-iHKNQ-Ar2UfiCraFYQNHdBQ9fNcTTRoh3kRpXRS_Gc,375
146
+ osbot_utils/helpers/flows/models/Flow_Run__Config.py,sha256=hLBPEgoKjyBqAuIGEmnrv6giAnhYcKSz7dljmBwWRBY,383
147
+ osbot_utils/helpers/flows/models/Flow_Run__Event.py,sha256=fEDjHDLSp5u6bRX4mbRJfGRmqVFN19pO5q0ADf6_KT4,566
148
+ osbot_utils/helpers/flows/models/Flow_Run__Event_Data.py,sha256=3tUabRdPG6zrZQPEYAFtjpk_996TkXUB02YwFBlQq3o,402
149
+ osbot_utils/helpers/flows/models/Flow_Run__Event_Type.py,sha256=y1GB6O_G6ZWCqjTyzyUhcjJSvhWC-572FvLhP6JNABY,372
155
150
  osbot_utils/helpers/flows/models/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
156
151
  osbot_utils/helpers/generators/Generator_Context_Manager.py,sha256=STpCn2Zh5G2TmyYMjeLMjfpkSYUUeU6mzV_O6Hu4g4Q,863
157
- osbot_utils/helpers/generators/Generator_Manager.py,sha256=eQzyZVxZjglzPmoxLJ7ib1pD8187YcKBIr7mljpSUF4,11731
152
+ osbot_utils/helpers/generators/Generator_Manager.py,sha256=XxE7ZZvziorolEM5FoMq-5yOFUi3yVaWcPB_XWHtm30,11728
158
153
  osbot_utils/helpers/generators/Model__Generator_State.py,sha256=cS9tigdBIAvexip2VC8B0meegslzlu-cOosTDiEpe54,903
159
- osbot_utils/helpers/generators/Model__Generator_Target.py,sha256=JKa_PEQeVNZDSMBAobADaor4zXAhM_XWPHrQ2NMApZs,819
154
+ osbot_utils/helpers/generators/Model__Generator_Target.py,sha256=Sh_1J0_RYOBYKqg19DP4_e2MPx6CHCzydkA56F8SjRs,816
160
155
  osbot_utils/helpers/generators/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
161
156
  osbot_utils/helpers/html/Dict_To_Css.py,sha256=u6B4Mx7PXr-gDrTrs1hgknnvsZVK4Fic5LqedKjo-lk,1097
162
157
  osbot_utils/helpers/html/Dict_To_Html.py,sha256=OlRSaDGOeseBNTxRB2ho5whqEacMXeAXWOfeVSEYqC4,3355
@@ -173,7 +168,7 @@ osbot_utils/helpers/html/Tag__Html.py,sha256=W_QFUF27vpR109g9rpca0zoQis1wkMjGuAt
173
168
  osbot_utils/helpers/html/Tag__Link.py,sha256=rQ-gZN8EkSv5x1S-smdjvFflwMQHACHQXiOdx0MFke8,437
174
169
  osbot_utils/helpers/html/Tag__Style.py,sha256=LPPlIN7GyMvfCUlbs2eXVMUr9jS0PX5M94A5Ig_jXIs,846
175
170
  osbot_utils/helpers/html/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
176
- osbot_utils/helpers/pubsub/Event__Queue.py,sha256=H4Hhmj_G3GjTcPFj6y1nVFt64vCwGRVdgta0T0b_a4E,5041
171
+ osbot_utils/helpers/pubsub/Event__Queue.py,sha256=bCtIdVlAuG-jvFEnz14oNhgRScEUrd8v9BqLcZleGks,5038
177
172
  osbot_utils/helpers/pubsub/PubSub__Client.py,sha256=6K3l4H-Tc0DhktrxpYzLVur1uZ532pQsHWprLNRXFJE,2316
178
173
  osbot_utils/helpers/pubsub/PubSub__Room.py,sha256=3drJIAVSAzXB_0Q9dXxwhYWxNaEUaMiWiXLY9Mh02DM,481
179
174
  osbot_utils/helpers/pubsub/PubSub__Server.py,sha256=DjQ6PsNGmULdFodspdNktADcoIN3FbdvAitE52m89-w,3548
@@ -192,7 +187,7 @@ osbot_utils/helpers/python_compatibility/__init__.py,sha256=47DEQpj8HBSa-_TImW-5
192
187
  osbot_utils/helpers/python_compatibility/python_3_8.py,sha256=kh846vs3ir8xD0RSARJBOL0xufnt3L_Td3K45lDfqng,161
193
188
  osbot_utils/helpers/sqlite/Capture_Sqlite_Error.py,sha256=GSuRYgs1yKQjxMszPoaI7fsfMfuUqhb64AaIysRE6Cs,1747
194
189
  osbot_utils/helpers/sqlite/Sqlite__Cursor.py,sha256=k5G9Tkk3nx6nHoSanLmpuJG_TceAmN7uRBCt0bo6sIc,3364
195
- osbot_utils/helpers/sqlite/Sqlite__Database.py,sha256=YSuppFFiR-RcGiAXxhS-Oygw5PvdbV94wm4ybQ7cOF8,5616
190
+ osbot_utils/helpers/sqlite/Sqlite__Database.py,sha256=Ts0qM3Nakot5o9wbFaaW3iq2pDl9USfXGS8GFUBD2wY,5613
196
191
  osbot_utils/helpers/sqlite/Sqlite__Field.py,sha256=oBWglAOKN0EWVtaRwiQFxmR1FQ61lQ35yKkWXjSiihs,2911
197
192
  osbot_utils/helpers/sqlite/Sqlite__Globals.py,sha256=aP6uIy_y4xzl2soTUCFIJRjsb8JyfxfL6qIEZKIWy_4,230
198
193
  osbot_utils/helpers/sqlite/Sqlite__Table.py,sha256=FsFSolFN2N5V8DfZPp4gZL9xmCXaOhmG38wQmgRrvp8,15145
@@ -201,9 +196,9 @@ osbot_utils/helpers/sqlite/Temp_Sqlite__Database__Disk.py,sha256=-BhK0_3lSJPWDt-
201
196
  osbot_utils/helpers/sqlite/Temp_Sqlite__Table.py,sha256=Na2dOHlYSVUKK7STHwdzBYbQgvW2a6cEhUnlC0-T8wk,729
202
197
  osbot_utils/helpers/sqlite/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
203
198
  osbot_utils/helpers/sqlite/cache/Schema__Table__Requests.py,sha256=fvLyTYYKighMEjZW2gGrKoyKIqDoitrvO0l0nLdDqTs,381
204
- osbot_utils/helpers/sqlite/cache/Sqlite__Cache__Requests.py,sha256=v6a1pDzdwIfk-5KQajz1NTNrIozYFxxxIrxDnppsli8,6190
199
+ osbot_utils/helpers/sqlite/cache/Sqlite__Cache__Requests.py,sha256=SC-NBsj-wsAcv95YqZ9Ry0ClxRoUMPwkGhBTXw2jTRM,6187
205
200
  osbot_utils/helpers/sqlite/cache/Sqlite__Cache__Requests__Patch.py,sha256=HB-LbZQ0VHi9cJm0647WJKUZIjesMppKQ3ZbTOsMgCI,2474
206
- osbot_utils/helpers/sqlite/cache/Sqlite__Cache__Requests__Sqlite.py,sha256=HInQAjpmPysVkAcizaZkZe4WD8LENk3zX9h9-3yAJeM,782
201
+ osbot_utils/helpers/sqlite/cache/Sqlite__Cache__Requests__Sqlite.py,sha256=vaijPsoQU2_2uQEBa_ukeA6o-EhJkn2KmhKJ3_hse3o,779
207
202
  osbot_utils/helpers/sqlite/cache/Sqlite__Cache__Requests__Table.py,sha256=77uO-8WLmzBh5A4Y2VVclKlp2kn1aZ6iJVCtOr4zYFo,2830
208
203
  osbot_utils/helpers/sqlite/cache/Sqlite__DB__Requests.py,sha256=CWB-hTcgly2T_7HOZM5gUgfdsvgMus5nX2M_wpjVLZs,1643
209
204
  osbot_utils/helpers/sqlite/cache/TestCase__Sqlite__Cache__Requests.py,sha256=TLUdQC6vsf5BcDP15CCeoYkipVG30bzqFcqEJpH4dWg,1645
@@ -228,17 +223,17 @@ osbot_utils/helpers/sqlite/tables/Sqlite__Table__Files.py,sha256=4YguiuqzcfTadPW
228
223
  osbot_utils/helpers/sqlite/tables/Sqlite__Table__Nodes.py,sha256=GT8h3wD4hGvEtqQuBs0sBbcu2ydktRHTi95PEL2ffHQ,1721
229
224
  osbot_utils/helpers/sqlite/tables/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
230
225
  osbot_utils/helpers/ssh/SCP.py,sha256=9PgJbyWKfxJj00Ijaj7o6ffxPXuNoureb6JlHMPbHww,3330
231
- osbot_utils/helpers/ssh/SSH.py,sha256=jyRZIL8rif1Fn76i0ZJWSkY0VyQuB1J2LAWIvu4jKpU,1545
226
+ osbot_utils/helpers/ssh/SSH.py,sha256=KPmIewh-ucGqubrwZoZILhX60MCV9UEw8do8JKrZ91s,1542
232
227
  osbot_utils/helpers/ssh/SSH__Cache__Requests.py,sha256=Dqh4biVcuaXbQVvn3Tx-kSGBGHiF-2wVsgu96EhD6gU,3359
233
- osbot_utils/helpers/ssh/SSH__Execute.py,sha256=YSZEsS_j2PWyfGQNYNv2lvvo2tZlT3pGIwx0YLRqZ4w,6969
228
+ osbot_utils/helpers/ssh/SSH__Execute.py,sha256=xmJe7JySTX2TG9TuL_fGFDkz91Yz1TL6ntubE1Myh5Q,6966
234
229
  osbot_utils/helpers/ssh/SSH__Health_Check.py,sha256=WDmBD6ejNcBeicXfjpsiNzH-WR3Jejx0re3WfwjSWyQ,2083
235
230
  osbot_utils/helpers/ssh/SSH__Linux.py,sha256=O1uyKcklaj2tHqQZln7dVinzjl9-EI52KzP8ojQr244,4330
236
231
  osbot_utils/helpers/ssh/SSH__Linux__Amazon.py,sha256=ZJFb7LFTvclAuhH5OoOtJ361NoX9ecHTaFX-iSmnzmk,596
237
- osbot_utils/helpers/ssh/SSH__Python.py,sha256=O2DAwkbXzwkis8lffoqIL2NPSfYcN44Mr8i9Ey2iMKk,2066
232
+ osbot_utils/helpers/ssh/SSH__Python.py,sha256=MoihfGU1qhl4tdM4s0AifjRVQP75gEuJk-OYSC3F_XI,2063
238
233
  osbot_utils/helpers/ssh/TestCase__SSH.py,sha256=MD8sq0_kI4f6pEmEO0cLq2mQOhIqbP45ZxFJNG44Jg4,1773
239
234
  osbot_utils/helpers/ssh/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
240
235
  osbot_utils/helpers/trace/Trace_Call.py,sha256=O_y6cncgneYrj3ARDMz-o9Yi1LjsESibUqkGFAg0Jk0,8886
241
- osbot_utils/helpers/trace/Trace_Call__Config.py,sha256=UAjdsDEqsPBBsu-h4_QKYL4UMukJmQYBBWGYTmSKS40,3361
236
+ osbot_utils/helpers/trace/Trace_Call__Config.py,sha256=jppE8zenVvyEOOTP218eDL9wciZztxA100VZTUWmhs8,3358
242
237
  osbot_utils/helpers/trace/Trace_Call__Handler.py,sha256=lXMk_7M9SK7s13qNpLuk5qx9CJJ3lzMJGdI8tB-nO-c,12744
243
238
  osbot_utils/helpers/trace/Trace_Call__Print_Lines.py,sha256=cy7zLv0_JNxdOIQPfZk6J9bv6AkIW6O643w0ykClXbw,4820
244
239
  osbot_utils/helpers/trace/Trace_Call__Print_Traces.py,sha256=2LGeWMGP1uhSojGMmJmL3bH2B5LFIlfYEqEPNqoyKJw,8628
@@ -248,26 +243,19 @@ osbot_utils/helpers/trace/Trace_Call__Stats.py,sha256=gmiotIrOXe2ssxodzQQ56t8eGT
248
243
  osbot_utils/helpers/trace/Trace_Call__View_Model.py,sha256=a40nn6agCEMd2ecsJ93n8vXij0omh0D69QilqwmN_ao,4545
249
244
  osbot_utils/helpers/trace/Trace_Files.py,sha256=SNpAmuBlSUS9NyVocgZ5vevzqVaIqoh622yZge3a53A,978
250
245
  osbot_utils/helpers/trace/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
251
- osbot_utils/helpers/type_safe/Type_Safe__Validator.py,sha256=cJIPSBarjV716SZUOLvz7Mthjk-aUYKUQtRDtKUBmN4,779
252
- osbot_utils/helpers/type_safe/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
253
- osbot_utils/helpers/type_safe/validators/Validator__Max.py,sha256=UxrS-tDS5RqfV5aCSbgoGcKHC9VPGqeS_ACB1dqNpQw,1272
254
- osbot_utils/helpers/type_safe/validators/Validator__Min.py,sha256=krNnQjt8XCS5smESvGsFHw2dJWmS9VKn6WXcY1xatkY,1978
255
- osbot_utils/helpers/type_safe/validators/Validator__One_Of.py,sha256=AEknqmurAilHMOvbL6EBxAho2pz4llKPNeX0FHBPru8,678
256
- osbot_utils/helpers/type_safe/validators/Validator__Regex.py,sha256=k6mZSDM1lISwCK-Atnuw5TTe1qx6DIf-DbzT4hL1Pu8,1005
257
- osbot_utils/helpers/type_safe/validators/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
258
- osbot_utils/helpers/xml/Xml__Attribute.py,sha256=r29x8ehRug27KuHQKQEGl6Thz_MNaNHy6X3cPRgH4ho,148
259
- osbot_utils/helpers/xml/Xml__Element.py,sha256=J0hMaJPIBNmZf4wo0xrtZBZd5vWie5FoX9XqtAXQToM,871
260
- osbot_utils/helpers/xml/Xml__File.py,sha256=c3axXx07rIoK5tGzpLwH-X1B7nusSe1-SZAxJNZJ0KI,420
261
- osbot_utils/helpers/xml/Xml__File__Load.py,sha256=iAH21HjrqFoZlU5-Kg2RE53RBdNs0mDaASETUTnbhRo,3625
262
- osbot_utils/helpers/xml/Xml__File__To_Dict.py,sha256=1KGswrpMpUPu4JDYUbkP8GTOQfHGcGONnDYsi-_aqv0,2061
263
- osbot_utils/helpers/xml/Xml__File__To_Xml.py,sha256=HvUbYOfLz6i160_to90dP3b1uy3Z85nnj7qaGN8LEBI,2884
246
+ osbot_utils/helpers/xml/Xml__Attribute.py,sha256=_dIVyp0WHfdv306vAj5bpEtiqKa83MLKRH925rjKa94,145
247
+ osbot_utils/helpers/xml/Xml__Element.py,sha256=NLRdiTsRhqRf0I0ScAdN-tHuSh2qNuKP_tldx7iiSv4,868
248
+ osbot_utils/helpers/xml/Xml__File.py,sha256=JbD6bDvqpN458mO5_p9ZK8QfuUJAIge9iVI4woNqO2o,417
249
+ osbot_utils/helpers/xml/Xml__File__Load.py,sha256=zvs5yGLk5wf16zadWcTD97R4ltn_Hlap39KkkmrtOx0,3622
250
+ osbot_utils/helpers/xml/Xml__File__To_Dict.py,sha256=YqOOZ_YYSFteCG-oJu3V2Sg9Rr4w2cARv52G3BnfbIY,2058
251
+ osbot_utils/helpers/xml/Xml__File__To_Xml.py,sha256=j_JyEsjKGp1TUxAKECHKRo_mlyO0wjR3x_rGb_dn52M,2881
264
252
  osbot_utils/helpers/xml/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
265
- osbot_utils/helpers/xml/rss/RSS__Channel.py,sha256=HPLsGRNIaPh0_8GYE2a53bSV5Bb4E6j6tKGuy4bxg4Y,605
266
- osbot_utils/helpers/xml/rss/RSS__Enclosure.py,sha256=f75U7nXXJ7hLs2zPDui0WsFAmMJaeaverjlxD4M-Otg,142
267
- osbot_utils/helpers/xml/rss/RSS__Feed.py,sha256=lhFoeBMWdH1Dp8QnagCGj9bfZHKmB_HkE56hPVZNaM0,425
253
+ osbot_utils/helpers/xml/rss/RSS__Channel.py,sha256=iAlAqeoHVEhaHqUgQ9DK7xPZwikQS34z0pgXfE7qQeM,602
254
+ osbot_utils/helpers/xml/rss/RSS__Enclosure.py,sha256=9lUsIVJ4TkR_mBFDc6-ISMg7fPXe8FiKFSWjpnlWIMY,139
255
+ osbot_utils/helpers/xml/rss/RSS__Feed.py,sha256=W4T2rmJoZr4kfOPSkZXkkKPnOk5bPlZfLzOf7pah9LQ,422
268
256
  osbot_utils/helpers/xml/rss/RSS__Feed__Parser.py,sha256=7sub6zcWqGz8FORXFYRyopTswboUkCU5uGEXAZ6BZDw,5380
269
- osbot_utils/helpers/xml/rss/RSS__Image.py,sha256=4uI0jd17pqb8FJ8HQcERXvn3WjGbiOVI8u1tv-IN59U,171
270
- osbot_utils/helpers/xml/rss/RSS__Item.py,sha256=y-QI2WBfd9FEsVWc_eNirvZUUslpb2z27hxcm-RVHJQ,611
257
+ osbot_utils/helpers/xml/rss/RSS__Image.py,sha256=13k8K03VTZbP0efeDL07oZF7Lg0CQccXBd1Qk965mHY,168
258
+ osbot_utils/helpers/xml/rss/RSS__Item.py,sha256=K6YF3EVUu6E-_ISke98QXgnJlfOI5YAIO4pBzUZq7gE,608
271
259
  osbot_utils/testing/Catch.py,sha256=HdNoKnrPBjvVj87XYN-Wa1zpo5z3oByURT6TKbd5QpQ,2229
272
260
  osbot_utils/testing/Custom_Handler_For_Http_Tests.py,sha256=LKscFEcuwTQQ9xl4q71PR5FA8U-q8OtfTkCJoIgQIoQ,5358
273
261
  osbot_utils/testing/Duration.py,sha256=iBrczAuw6j3jXtG7ZPraT0PXbCILEcCplJbqei96deA,2217
@@ -280,7 +268,7 @@ osbot_utils/testing/Profiler.py,sha256=4em6Lpp0ONRDoDDCZsc_CdAOi_QolKOp4eA7KHN96
280
268
  osbot_utils/testing/Pytest.py,sha256=R3qdsIXGcNQcu7iobz0RB8AhbbHhc6t757tZoSZRrxA,730
281
269
  osbot_utils/testing/Stderr.py,sha256=ynf0Wle9NvgneLChzAxFBQ0QlE5sbri_fzJ8bEJMNkc,718
282
270
  osbot_utils/testing/Stdout.py,sha256=Gmxd_dOplXlucdSbOhYhka9sWP-Hmqb7ZuLs_JjtW7Y,592
283
- osbot_utils/testing/Temp_Env_Vars.py,sha256=mQsc_ogtx2TA_20Y5zPusUZGvk_EZv4PMZjAXElbtFw,933
271
+ osbot_utils/testing/Temp_Env_Vars.py,sha256=3HK_miVX8fya7y9kYgkVwWmoF-PfJpUUOkwatFkK3QI,930
284
272
  osbot_utils/testing/Temp_File.py,sha256=yZBL9MmcNU4PCQ4xlF4rSss4GylKoX3T_AJF-BlQhdI,1693
285
273
  osbot_utils/testing/Temp_Folder.py,sha256=Dbcohr2ciex6w-kB79R41Nuoa0pgpDbKtPGnlMmJ73k,5194
286
274
  osbot_utils/testing/Temp_Sys_Path.py,sha256=gOMD-7dQYQlejoDYUqsrmuZQ9DLC07ymPZB3zYuNmG4,256
@@ -290,6 +278,18 @@ osbot_utils/testing/Temp_Zip_In_Memory.py,sha256=ibDIWt3K4CX558PbkLbX3InHyWYZcwQ
290
278
  osbot_utils/testing/Unit_Test.py,sha256=MReR_wDGbbXFDPz7cmuGflcTxRB6TBnO9mYqRpSq8Pk,1304
291
279
  osbot_utils/testing/Unzip_File.py,sha256=V5H97XO9rlvG5EYOSzAH4kTtAH1ohZ8R8ImvJh46ZNg,1177
292
280
  osbot_utils/testing/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
281
+ osbot_utils/type_safe/Type_Safe.py,sha256=8FsDdYsfoCgnev5GZdzuuZxxTYDY4RvkyNrp_kZ6QZY,29024
282
+ osbot_utils/type_safe/Type_Safe_Method.py,sha256=8E88of__An9_ZhJKz6Kp22C1mb9WLED0jWNLOII3fJs,10489
283
+ osbot_utils/type_safe/Type_Safe__Base.py,sha256=mL8GMaR9tsaUfwk8d-8zp2g-A8kNKiN6kroEFaNvMOk,5518
284
+ osbot_utils/type_safe/Type_Safe__Dict.py,sha256=I_Ac0JH-ahmQrkADFVyiobTlH1JI31MKHaNszQW4PBo,2396
285
+ osbot_utils/type_safe/Type_Safe__List.py,sha256=SzSIBkwSOAEpW_V2qh4-f0YHzmgB0T8PczBLbDgZGvg,1340
286
+ osbot_utils/type_safe/Type_Safe__Validator.py,sha256=cJIPSBarjV716SZUOLvz7Mthjk-aUYKUQtRDtKUBmN4,779
287
+ osbot_utils/type_safe/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
288
+ osbot_utils/type_safe/validators/Validator__Max.py,sha256=ctsMADDqq9l9mxwedrOfI9Dg53nPxCsluB0cO8C6bT4,1264
289
+ osbot_utils/type_safe/validators/Validator__Min.py,sha256=FfVoErZcibqYXvnH-Nl9c2pfPSKFH-CgAhUVBYsxVrc,1970
290
+ osbot_utils/type_safe/validators/Validator__One_Of.py,sha256=RvEYjf2zT06LVucZeNhzFqTZOh-Bs-C9UNjXd_YLWa8,670
291
+ osbot_utils/type_safe/validators/Validator__Regex.py,sha256=BZemPOU8XWc9bxk4jqPm_adnfhbOf6GD4-gatr_L0wo,997
292
+ osbot_utils/type_safe/validators/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
293
293
  osbot_utils/utils/Assert.py,sha256=u9XLgYn91QvNWZGyPi29SjPJSXRHlm9andIn3NJEVog,1745
294
294
  osbot_utils/utils/Call_Stack.py,sha256=awhWstC2mJCrOjNqNheTe2B7at-JFP6XG7VkMPpPNOE,6647
295
295
  osbot_utils/utils/Csv.py,sha256=oHLVpjRJqrLMz9lubMCNEoThXWju5rNTprcwHc1zq2c,1012
@@ -307,7 +307,7 @@ osbot_utils/utils/Misc.py,sha256=H_xexJgiTxB3jDeDiW8efGQbO0Zuy8MM0iQ7qXC92JI,173
307
307
  osbot_utils/utils/Objects.py,sha256=7QS_rBiLMLiD28be_br-7NrLfR7LtxFImjUGko8MqXM,21933
308
308
  osbot_utils/utils/Png.py,sha256=V1juGp6wkpPigMJ8HcxrPDIP4bSwu51oNkLI8YqP76Y,1172
309
309
  osbot_utils/utils/Process.py,sha256=lr3CTiEkN3EiBx3ZmzYmTKlQoPdkgZBRjPulMxG-zdo,2357
310
- osbot_utils/utils/Python_Logger.py,sha256=tx8N6wRKL3RDHboDRKZn8SirSJdSAE9cACyJkxrThZ8,12792
310
+ osbot_utils/utils/Python_Logger.py,sha256=M9Oi62LxfnRSlCN8GhaiwiBINvcSdGy39FCWjyDD-Xg,12792
311
311
  osbot_utils/utils/Regex.py,sha256=MtHhk69ax7Nwu4CQZK7y4KXHZ6VREwEpIchuioB168c,960
312
312
  osbot_utils/utils/Status.py,sha256=Yq4s0TelXgn0i2QjCP9V8mP30GabXp_UL-jjM6Iwiw4,4305
313
313
  osbot_utils/utils/Str.py,sha256=KQVfh0o3BxJKVm24yhAhgIGH5QYfzpP1G-siVv2zQws,3301
@@ -316,8 +316,8 @@ osbot_utils/utils/Toml.py,sha256=Rxl8gx7mni5CvBAK-Ai02EKw-GwtJdd3yeHT2kMloik,166
316
316
  osbot_utils/utils/Version.py,sha256=Ww6ChwTxqp1QAcxOnztkTicShlcx6fbNsWX5xausHrg,422
317
317
  osbot_utils/utils/Zip.py,sha256=pR6sKliUY0KZXmqNzKY2frfW-YVQEVbLKiyqQX_lc-8,14052
318
318
  osbot_utils/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
319
- osbot_utils/version,sha256=hj792tBZ6NCLSnkj5lttcLXORlnd4_1CyyedSRJmqaU,8
320
- osbot_utils-1.95.0.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
321
- osbot_utils-1.95.0.dist-info/METADATA,sha256=erJLyJM0vNgo9YzaCaN6X99UyNcYPlgv1mh9enE0HyE,1317
322
- osbot_utils-1.95.0.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
323
- osbot_utils-1.95.0.dist-info/RECORD,,
319
+ osbot_utils/version,sha256=-3MMyLuBjmK9ygVGlyvQ_Mc51URgnLeD4U4j_MbsNV8,7
320
+ osbot_utils-2.1.0.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
321
+ osbot_utils-2.1.0.dist-info/METADATA,sha256=0z546iiaOhdptx11H5Rkku5U7OqeThn6I_J6Fa4dGiY,1315
322
+ osbot_utils-2.1.0.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
323
+ osbot_utils-2.1.0.dist-info/RECORD,,
@@ -1,22 +0,0 @@
1
- from osbot_utils.base_classes.Type_Safe__Base import type_str, Type_Safe__Base
2
-
3
- class Type_Safe__Dict(Type_Safe__Base, dict):
4
- def __init__(self, expected_key_type, expected_value_type, *args, **kwargs):
5
- super().__init__(*args, **kwargs)
6
-
7
- self.expected_key_type = expected_key_type
8
- self.expected_value_type = expected_value_type
9
-
10
- for k, v in self.items(): # check type-safety of ctor arguments
11
- self.is_instance_of_type(k, self.expected_key_type )
12
- self.is_instance_of_type(v, self.expected_value_type)
13
-
14
- def __setitem__(self, key, value): # Check type-safety before allowing assignment.
15
- self.is_instance_of_type(key, self.expected_key_type)
16
- self.is_instance_of_type(value, self.expected_value_type)
17
- super().__setitem__(key, value)
18
-
19
- def __repr__(self):
20
- key_type_name = type_str(self.expected_key_type)
21
- value_type_name = type_str(self.expected_value_type)
22
- return f"dict[{key_type_name}, {value_type_name}] with {len(self)} entries"
@@ -1,22 +0,0 @@
1
- from osbot_utils.base_classes.Type_Safe__Base import Type_Safe__Base, type_str
2
-
3
-
4
- class Type_Safe__List(Type_Safe__Base, list):
5
-
6
- def __init__(self, expected_type, *args):
7
- super().__init__(*args)
8
- self.expected_type = expected_type
9
-
10
- def __repr__(self):
11
- expected_type_name = type_str(self.expected_type)
12
- return f"list[{expected_type_name}] with {len(self)} elements"
13
-
14
- def append(self, item):
15
- try:
16
- self.is_instance_of_type(item, self.expected_type)
17
- except TypeError as e:
18
- raise TypeError(f"In Type_Safe__List: Invalid type for item: {e}")
19
- super().append(item)
20
-
21
-
22
-
File without changes