CleverSwarm API invocation example

This commit is contained in:
Stanislav Hejny
2025-02-25 20:35:20 +00:00
parent 286a4986b3
commit eb26eec767
36 changed files with 1269 additions and 126 deletions
+10
View File
@@ -17,6 +17,11 @@ class AMQRouteFactory:
@staticmethod
def from_string(data):
"""
Builds the AMQRoute from its string form.
:param data: route string
:return: AMQRoute object
"""
try:
keys = data.split(RS)
if len(keys) >= 5:
@@ -55,6 +60,11 @@ class AMQRouteFactory:
@staticmethod
def validate(route_str):
"""
Validates the route string.
:param route_str: route string
:return: boolean validity indicator
"""
if route_str is not None:
return route_str.count(":") > 4
return False