code0-hercules 1.3.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.
- code0_hercules-1.3.0.dist-info/METADATA +79 -0
- code0_hercules-1.3.0.dist-info/RECORD +258 -0
- code0_hercules-1.3.0.dist-info/WHEEL +5 -0
- code0_hercules-1.3.0.dist-info/entry_points.txt +2 -0
- code0_hercules-1.3.0.dist-info/top_level.txt +1 -0
- hercules/__init__.py +81 -0
- hercules/_metadata.py +38 -0
- hercules/_tsgen/convert.mjs +96 -0
- hercules/_tsgen/package-lock.json +366 -0
- hercules/_tsgen/package.json +11 -0
- hercules/_tucana/__init__.py +29 -0
- hercules/_tucana/helpers.py +73 -0
- hercules/action.py +345 -0
- hercules/actions/__init__.py +21 -0
- hercules/actions/execution.py +121 -0
- hercules/actions/flow_execution.py +11 -0
- hercules/actions/flow_update.py +18 -0
- hercules/actions/module_configurations.py +14 -0
- hercules/actions/sub_flow_execution.py +14 -0
- hercules/cli.py +137 -0
- hercules/decorators/__init__.py +0 -0
- hercules/decorators/datatype.py +39 -0
- hercules/decorators/event.py +35 -0
- hercules/decorators/function.py +59 -0
- hercules/decorators/meta.py +82 -0
- hercules/decorators/runtime_event.py +15 -0
- hercules/decorators/runtime_function.py +18 -0
- hercules/definitions/__init__.py +162 -0
- hercules/definitions/cron_action/__init__.py +0 -0
- hercules/definitions/cron_action/data_types/__init__.py +0 -0
- hercules/definitions/cron_action/data_types/cron_day_of_month.py +11 -0
- hercules/definitions/cron_action/data_types/cron_day_of_week.py +11 -0
- hercules/definitions/cron_action/data_types/cron_hour.py +11 -0
- hercules/definitions/cron_action/data_types/cron_minute.py +11 -0
- hercules/definitions/cron_action/data_types/cron_month.py +11 -0
- hercules/definitions/cron_action/runtime_flow_types/__init__.py +0 -0
- hercules/definitions/cron_action/runtime_flow_types/cron.py +19 -0
- hercules/definitions/rest_action/__init__.py +0 -0
- hercules/definitions/rest_action/data_types/__init__.py +0 -0
- hercules/definitions/rest_action/data_types/rest_adapter_input.py +19 -0
- hercules/definitions/rest_action/data_types/rest_auth_type.py +19 -0
- hercules/definitions/rest_action/data_types/rest_auth_value.py +11 -0
- hercules/definitions/rest_action/runtime_flow_types/__init__.py +0 -0
- hercules/definitions/rest_action/runtime_flow_types/rest.py +20 -0
- hercules/definitions/rest_action/runtime_functions/__init__.py +0 -0
- hercules/definitions/rest_action/runtime_functions/rest_control_respond.py +21 -0
- hercules/definitions/taurus_boolean/__init__.py +0 -0
- hercules/definitions/taurus_boolean/data_types/__init__.py +0 -0
- hercules/definitions/taurus_boolean/data_types/boolean.py +11 -0
- hercules/definitions/taurus_boolean/runtime_functions/__init__.py +0 -0
- hercules/definitions/taurus_boolean/runtime_functions/std_boolean_as_number.py +18 -0
- hercules/definitions/taurus_boolean/runtime_functions/std_boolean_as_text.py +18 -0
- hercules/definitions/taurus_boolean/runtime_functions/std_boolean_from_number.py +18 -0
- hercules/definitions/taurus_boolean/runtime_functions/std_boolean_from_text.py +18 -0
- hercules/definitions/taurus_boolean/runtime_functions/std_boolean_is_equal.py +19 -0
- hercules/definitions/taurus_boolean/runtime_functions/std_boolean_negate.py +18 -0
- hercules/definitions/taurus_color/__init__.py +0 -0
- hercules/definitions/taurus_color/data_types/__init__.py +0 -0
- hercules/definitions/taurus_color/data_types/color.py +17 -0
- hercules/definitions/taurus_color/runtime_functions/__init__.py +0 -0
- hercules/definitions/taurus_color/runtime_functions/std_color_as_hex.py +18 -0
- hercules/definitions/taurus_color/runtime_functions/std_color_as_hsl.py +18 -0
- hercules/definitions/taurus_color/runtime_functions/std_color_as_rgb.py +18 -0
- hercules/definitions/taurus_color/runtime_functions/std_color_from_hex.py +18 -0
- hercules/definitions/taurus_color/runtime_functions/std_color_from_hsl.py +21 -0
- hercules/definitions/taurus_color/runtime_functions/std_color_from_rgb.py +21 -0
- hercules/definitions/taurus_control/__init__.py +0 -0
- hercules/definitions/taurus_control/data_types/__init__.py +0 -0
- hercules/definitions/taurus_control/data_types/comparator.py +21 -0
- hercules/definitions/taurus_control/data_types/consumer.py +20 -0
- hercules/definitions/taurus_control/data_types/predicate.py +20 -0
- hercules/definitions/taurus_control/data_types/runnable.py +13 -0
- hercules/definitions/taurus_control/data_types/transform.py +20 -0
- hercules/definitions/taurus_control/runtime_functions/__init__.py +0 -0
- hercules/definitions/taurus_control/runtime_functions/std_control_if.py +19 -0
- hercules/definitions/taurus_control/runtime_functions/std_control_if_else.py +21 -0
- hercules/definitions/taurus_control/runtime_functions/std_control_return.py +18 -0
- hercules/definitions/taurus_control/runtime_functions/std_control_stop.py +16 -0
- hercules/definitions/taurus_control/runtime_functions/std_control_value.py +18 -0
- hercules/definitions/taurus_date/__init__.py +0 -0
- hercules/definitions/taurus_date/data_types/__init__.py +0 -0
- hercules/definitions/taurus_date/data_types/date.py +11 -0
- hercules/definitions/taurus_date/data_types/hour.py +11 -0
- hercules/definitions/taurus_date/data_types/minute.py +11 -0
- hercules/definitions/taurus_date/data_types/month.py +22 -0
- hercules/definitions/taurus_date/runtime_functions/__init__.py +0 -0
- hercules/definitions/taurus_date/runtime_functions/std_date_format.py +20 -0
- hercules/definitions/taurus_date/runtime_functions/std_date_from.py +24 -0
- hercules/definitions/taurus_date/runtime_functions/std_date_from_text.py +19 -0
- hercules/definitions/taurus_date/runtime_functions/std_date_from_unix.py +18 -0
- hercules/definitions/taurus_date/runtime_functions/std_date_now.py +16 -0
- hercules/definitions/taurus_file/__init__.py +0 -0
- hercules/definitions/taurus_file/data_types/__init__.py +0 -0
- hercules/definitions/taurus_file/data_types/file.py +19 -0
- hercules/definitions/taurus_file/runtime_functions/__init__.py +0 -0
- hercules/definitions/taurus_file/runtime_functions/std_file_size.py +18 -0
- hercules/definitions/taurus_http/__init__.py +0 -0
- hercules/definitions/taurus_http/data_types/__init__.py +0 -0
- hercules/definitions/taurus_http/data_types/http_auth_place.py +12 -0
- hercules/definitions/taurus_http/data_types/http_auth_type.py +17 -0
- hercules/definitions/taurus_http/data_types/http_auth_value.py +11 -0
- hercules/definitions/taurus_http/data_types/http_method.py +16 -0
- hercules/definitions/taurus_http/data_types/http_payload.py +11 -0
- hercules/definitions/taurus_http/data_types/http_request.py +19 -0
- hercules/definitions/taurus_http/data_types/http_response.py +18 -0
- hercules/definitions/taurus_http/data_types/http_schema.py +31 -0
- hercules/definitions/taurus_http/data_types/http_status_code.py +13 -0
- hercules/definitions/taurus_http/data_types/http_url.py +13 -0
- hercules/definitions/taurus_http/runtime_functions/__init__.py +0 -0
- hercules/definitions/taurus_http/runtime_functions/http_request_send.py +26 -0
- hercules/definitions/taurus_list/__init__.py +0 -0
- hercules/definitions/taurus_list/data_types/__init__.py +0 -0
- hercules/definitions/taurus_list/data_types/list.py +13 -0
- hercules/definitions/taurus_list/runtime_functions/__init__.py +0 -0
- hercules/definitions/taurus_list/runtime_functions/std_list_at.py +20 -0
- hercules/definitions/taurus_list/runtime_functions/std_list_concat.py +20 -0
- hercules/definitions/taurus_list/runtime_functions/std_list_filter.py +19 -0
- hercules/definitions/taurus_list/runtime_functions/std_list_find.py +20 -0
- hercules/definitions/taurus_list/runtime_functions/std_list_find_index.py +19 -0
- hercules/definitions/taurus_list/runtime_functions/std_list_find_last.py +20 -0
- hercules/definitions/taurus_list/runtime_functions/std_list_first.py +18 -0
- hercules/definitions/taurus_list/runtime_functions/std_list_flat.py +18 -0
- hercules/definitions/taurus_list/runtime_functions/std_list_for_each.py +19 -0
- hercules/definitions/taurus_list/runtime_functions/std_list_index_of.py +19 -0
- hercules/definitions/taurus_list/runtime_functions/std_list_is_empty.py +18 -0
- hercules/definitions/taurus_list/runtime_functions/std_list_join.py +19 -0
- hercules/definitions/taurus_list/runtime_functions/std_list_last.py +18 -0
- hercules/definitions/taurus_list/runtime_functions/std_list_map.py +19 -0
- hercules/definitions/taurus_list/runtime_functions/std_list_max.py +18 -0
- hercules/definitions/taurus_list/runtime_functions/std_list_min.py +18 -0
- hercules/definitions/taurus_list/runtime_functions/std_list_pop.py +18 -0
- hercules/definitions/taurus_list/runtime_functions/std_list_push.py +19 -0
- hercules/definitions/taurus_list/runtime_functions/std_list_remove.py +19 -0
- hercules/definitions/taurus_list/runtime_functions/std_list_reverse.py +18 -0
- hercules/definitions/taurus_list/runtime_functions/std_list_size.py +18 -0
- hercules/definitions/taurus_list/runtime_functions/std_list_sort.py +19 -0
- hercules/definitions/taurus_list/runtime_functions/std_list_sort_reverse.py +19 -0
- hercules/definitions/taurus_list/runtime_functions/std_list_sum.py +18 -0
- hercules/definitions/taurus_list/runtime_functions/std_list_to_unique.py +18 -0
- hercules/definitions/taurus_number/__init__.py +0 -0
- hercules/definitions/taurus_number/data_types/__init__.py +0 -0
- hercules/definitions/taurus_number/data_types/number.py +11 -0
- hercules/definitions/taurus_number/runtime_functions/__init__.py +0 -0
- hercules/definitions/taurus_number/runtime_functions/std_number_abs.py +18 -0
- hercules/definitions/taurus_number/runtime_functions/std_number_add.py +19 -0
- hercules/definitions/taurus_number/runtime_functions/std_number_arccos.py +18 -0
- hercules/definitions/taurus_number/runtime_functions/std_number_arcsin.py +18 -0
- hercules/definitions/taurus_number/runtime_functions/std_number_arctan.py +18 -0
- hercules/definitions/taurus_number/runtime_functions/std_number_as_text.py +18 -0
- hercules/definitions/taurus_number/runtime_functions/std_number_clamp.py +20 -0
- hercules/definitions/taurus_number/runtime_functions/std_number_cos.py +18 -0
- hercules/definitions/taurus_number/runtime_functions/std_number_cosh.py +18 -0
- hercules/definitions/taurus_number/runtime_functions/std_number_divide.py +20 -0
- hercules/definitions/taurus_number/runtime_functions/std_number_euler.py +16 -0
- hercules/definitions/taurus_number/runtime_functions/std_number_exponential.py +19 -0
- hercules/definitions/taurus_number/runtime_functions/std_number_from_text.py +18 -0
- hercules/definitions/taurus_number/runtime_functions/std_number_has_digits.py +18 -0
- hercules/definitions/taurus_number/runtime_functions/std_number_is_equal.py +19 -0
- hercules/definitions/taurus_number/runtime_functions/std_number_is_greater.py +19 -0
- hercules/definitions/taurus_number/runtime_functions/std_number_is_less.py +19 -0
- hercules/definitions/taurus_number/runtime_functions/std_number_is_positive.py +18 -0
- hercules/definitions/taurus_number/runtime_functions/std_number_is_zero.py +18 -0
- hercules/definitions/taurus_number/runtime_functions/std_number_ln.py +18 -0
- hercules/definitions/taurus_number/runtime_functions/std_number_log.py +19 -0
- hercules/definitions/taurus_number/runtime_functions/std_number_max.py +19 -0
- hercules/definitions/taurus_number/runtime_functions/std_number_min.py +19 -0
- hercules/definitions/taurus_number/runtime_functions/std_number_modulo.py +19 -0
- hercules/definitions/taurus_number/runtime_functions/std_number_multiply.py +19 -0
- hercules/definitions/taurus_number/runtime_functions/std_number_negate.py +18 -0
- hercules/definitions/taurus_number/runtime_functions/std_number_pi.py +16 -0
- hercules/definitions/taurus_number/runtime_functions/std_number_random_number.py +19 -0
- hercules/definitions/taurus_number/runtime_functions/std_number_remove_digits.py +18 -0
- hercules/definitions/taurus_number/runtime_functions/std_number_root.py +19 -0
- hercules/definitions/taurus_number/runtime_functions/std_number_round.py +19 -0
- hercules/definitions/taurus_number/runtime_functions/std_number_round_down.py +19 -0
- hercules/definitions/taurus_number/runtime_functions/std_number_round_up.py +19 -0
- hercules/definitions/taurus_number/runtime_functions/std_number_sin.py +18 -0
- hercules/definitions/taurus_number/runtime_functions/std_number_sinh.py +18 -0
- hercules/definitions/taurus_number/runtime_functions/std_number_square.py +18 -0
- hercules/definitions/taurus_number/runtime_functions/std_number_square_root.py +18 -0
- hercules/definitions/taurus_number/runtime_functions/std_number_subtract.py +19 -0
- hercules/definitions/taurus_number/runtime_functions/std_number_tan.py +18 -0
- hercules/definitions/taurus_object/__init__.py +0 -0
- hercules/definitions/taurus_object/data_types/__init__.py +0 -0
- hercules/definitions/taurus_object/data_types/object.py +13 -0
- hercules/definitions/taurus_object/data_types/type.py +13 -0
- hercules/definitions/taurus_object/runtime_functions/__init__.py +0 -0
- hercules/definitions/taurus_object/runtime_functions/std_object_contains_key.py +19 -0
- hercules/definitions/taurus_object/runtime_functions/std_object_get.py +19 -0
- hercules/definitions/taurus_object/runtime_functions/std_object_keys.py +18 -0
- hercules/definitions/taurus_object/runtime_functions/std_object_set.py +20 -0
- hercules/definitions/taurus_object/runtime_functions/std_object_size.py +18 -0
- hercules/definitions/taurus_text/__init__.py +0 -0
- hercules/definitions/taurus_text/data_types/__init__.py +0 -0
- hercules/definitions/taurus_text/data_types/text.py +11 -0
- hercules/definitions/taurus_text/data_types/text_encoding.py +13 -0
- hercules/definitions/taurus_text/runtime_functions/__init__.py +0 -0
- hercules/definitions/taurus_text/runtime_functions/std_text_append.py +19 -0
- hercules/definitions/taurus_text/runtime_functions/std_text_as_bytes.py +18 -0
- hercules/definitions/taurus_text/runtime_functions/std_text_at.py +19 -0
- hercules/definitions/taurus_text/runtime_functions/std_text_byte_size.py +18 -0
- hercules/definitions/taurus_text/runtime_functions/std_text_capitalize.py +18 -0
- hercules/definitions/taurus_text/runtime_functions/std_text_chars.py +18 -0
- hercules/definitions/taurus_text/runtime_functions/std_text_contains.py +19 -0
- hercules/definitions/taurus_text/runtime_functions/std_text_decode.py +19 -0
- hercules/definitions/taurus_text/runtime_functions/std_text_encode.py +19 -0
- hercules/definitions/taurus_text/runtime_functions/std_text_ends_with.py +19 -0
- hercules/definitions/taurus_text/runtime_functions/std_text_from_ascii.py +18 -0
- hercules/definitions/taurus_text/runtime_functions/std_text_hex.py +18 -0
- hercules/definitions/taurus_text/runtime_functions/std_text_index_of.py +19 -0
- hercules/definitions/taurus_text/runtime_functions/std_text_insert.py +20 -0
- hercules/definitions/taurus_text/runtime_functions/std_text_is_equal.py +19 -0
- hercules/definitions/taurus_text/runtime_functions/std_text_length.py +18 -0
- hercules/definitions/taurus_text/runtime_functions/std_text_lowercase.py +18 -0
- hercules/definitions/taurus_text/runtime_functions/std_text_octal.py +18 -0
- hercules/definitions/taurus_text/runtime_functions/std_text_prepend.py +19 -0
- hercules/definitions/taurus_text/runtime_functions/std_text_remove.py +20 -0
- hercules/definitions/taurus_text/runtime_functions/std_text_replace.py +20 -0
- hercules/definitions/taurus_text/runtime_functions/std_text_replace_first.py +21 -0
- hercules/definitions/taurus_text/runtime_functions/std_text_replace_last.py +20 -0
- hercules/definitions/taurus_text/runtime_functions/std_text_reverse.py +18 -0
- hercules/definitions/taurus_text/runtime_functions/std_text_split.py +19 -0
- hercules/definitions/taurus_text/runtime_functions/std_text_starts_with.py +19 -0
- hercules/definitions/taurus_text/runtime_functions/std_text_swapcase.py +18 -0
- hercules/definitions/taurus_text/runtime_functions/std_text_to_ascii.py +18 -0
- hercules/definitions/taurus_text/runtime_functions/std_text_trim.py +18 -0
- hercules/definitions/taurus_text/runtime_functions/std_text_uppercase.py +18 -0
- hercules/events.py +23 -0
- hercules/internal/__init__.py +0 -0
- hercules/internal/connection.py +37 -0
- hercules/internal/literal.py +113 -0
- hercules/internal/module_builder.py +261 -0
- hercules/internal/pydantic_codegen.py +82 -0
- hercules/internal/schema.py +158 -0
- hercules/internal/tsgen.py +93 -0
- hercules/manager/__init__.py +0 -0
- hercules/manager/base.py +73 -0
- hercules/manager/config.py +45 -0
- hercules/manager/datatype.py +8 -0
- hercules/manager/event.py +8 -0
- hercules/manager/flow.py +12 -0
- hercules/manager/function.py +8 -0
- hercules/manager/runtime_event.py +8 -0
- hercules/manager/runtime_function.py +8 -0
- hercules/map/__init__.py +0 -0
- hercules/map/datatype.py +41 -0
- hercules/map/event.py +74 -0
- hercules/map/function.py +76 -0
- hercules/map/runtime_event.py +43 -0
- hercules/map/runtime_function.py +64 -0
- hercules/models/__init__.py +0 -0
- hercules/models/datatype.py +49 -0
- hercules/models/event.py +35 -0
- hercules/models/function.py +37 -0
- hercules/models/runtime_event.py +29 -0
- hercules/models/runtime_function.py +33 -0
- hercules/schema.py +38 -0
- hercules/types.py +88 -0
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
from hercules.models.runtime_function import RuntimeFunctionRunnable
|
|
2
|
+
from hercules.decorators.meta import Alias, Description, DisplayIcon, DisplayMessage, Identifier, Name, Signature
|
|
3
|
+
from hercules.decorators.runtime_function import OmitRuntimeFunction
|
|
4
|
+
from hercules.decorators.function import Parameter
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
@OmitRuntimeFunction()
|
|
8
|
+
@Identifier("std::number::is_zero")
|
|
9
|
+
@Signature("(value: NUMBER): BOOLEAN")
|
|
10
|
+
@Name({"code": "en-US", "content": "Number Is Zero"})
|
|
11
|
+
@Description({"code": "en-US", "content": "Returns true if the input number is zero. Otherwise returns false."})
|
|
12
|
+
@DisplayMessage({"code": "en-US", "content": "${value} Equals 0"})
|
|
13
|
+
@Alias({"code": "en-US", "content": "zero;equals zero;number;math;std;is"})
|
|
14
|
+
@DisplayIcon("tabler:math-function")
|
|
15
|
+
@Parameter({"runtime_name": "value", "name": [{"code": "en-US", "content": "Value"}], "description": [{"code": "en-US", "content": "This is the numeric input evaluated to determine whether it equals zero."}]})
|
|
16
|
+
class StdNumberIsZero(RuntimeFunctionRunnable):
|
|
17
|
+
def run(self, *args):
|
|
18
|
+
raise NotImplementedError("StdNumberIsZero.run() is not implemented")
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
from hercules.models.runtime_function import RuntimeFunctionRunnable
|
|
2
|
+
from hercules.decorators.meta import Alias, Description, DisplayIcon, DisplayMessage, Identifier, Name, Signature
|
|
3
|
+
from hercules.decorators.runtime_function import OmitRuntimeFunction
|
|
4
|
+
from hercules.decorators.function import Parameter
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
@OmitRuntimeFunction()
|
|
8
|
+
@Identifier("std::number::ln")
|
|
9
|
+
@Signature("(value: NUMBER): NUMBER")
|
|
10
|
+
@Name({"code": "en-US", "content": "Natural Logarithm"})
|
|
11
|
+
@Description({"code": "en-US", "content": "Calculates the natural logarithm (log base e) of a number."})
|
|
12
|
+
@DisplayMessage({"code": "en-US", "content": "Natural Logarithm of ${value}"})
|
|
13
|
+
@Alias({"code": "en-US", "content": "natural log;ln;log e;number;math;std"})
|
|
14
|
+
@DisplayIcon("tabler:math-function")
|
|
15
|
+
@Parameter({"runtime_name": "value", "name": [{"code": "en-US", "content": "Input Number"}], "description": [{"code": "en-US", "content": "The numeric input whose natural logarithm (log base e) will be calculated."}]})
|
|
16
|
+
class StdNumberLn(RuntimeFunctionRunnable):
|
|
17
|
+
def run(self, *args):
|
|
18
|
+
raise NotImplementedError("StdNumberLn.run() is not implemented")
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
from hercules.models.runtime_function import RuntimeFunctionRunnable
|
|
2
|
+
from hercules.decorators.meta import Alias, Description, DisplayIcon, DisplayMessage, Identifier, Name, Signature
|
|
3
|
+
from hercules.decorators.runtime_function import OmitRuntimeFunction
|
|
4
|
+
from hercules.decorators.function import Parameter
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
@OmitRuntimeFunction()
|
|
8
|
+
@Identifier("std::number::log")
|
|
9
|
+
@Signature("(value: NUMBER, base: NUMBER): NUMBER")
|
|
10
|
+
@Name({"code": "en-US", "content": "Logarithm"})
|
|
11
|
+
@Description({"code": "en-US", "content": "Calculates and returns the logarithm of a number with respect to a specified base."})
|
|
12
|
+
@DisplayMessage({"code": "en-US", "content": "Logarithm with Base ${base} of ${value}"})
|
|
13
|
+
@Alias({"code": "en-US", "content": "log;logarithm;log base;number;math;std"})
|
|
14
|
+
@DisplayIcon("tabler:math-function")
|
|
15
|
+
@Parameter({"runtime_name": "value", "name": [{"code": "en-US", "content": "Value"}], "description": [{"code": "en-US", "content": "The numeric input whose logarithm is to be calculated."}]})
|
|
16
|
+
@Parameter({"runtime_name": "base", "name": [{"code": "en-US", "content": "Base"}], "description": [{"code": "en-US", "content": "Specifies the logarithmic base to use (e.g., 10 for common log, e for natural log)."}]})
|
|
17
|
+
class StdNumberLog(RuntimeFunctionRunnable):
|
|
18
|
+
def run(self, *args):
|
|
19
|
+
raise NotImplementedError("StdNumberLog.run() is not implemented")
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
from hercules.models.runtime_function import RuntimeFunctionRunnable
|
|
2
|
+
from hercules.decorators.meta import Alias, Description, DisplayIcon, DisplayMessage, Identifier, Name, Signature
|
|
3
|
+
from hercules.decorators.runtime_function import OmitRuntimeFunction
|
|
4
|
+
from hercules.decorators.function import Parameter
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
@OmitRuntimeFunction()
|
|
8
|
+
@Identifier("std::number::max")
|
|
9
|
+
@Signature("(first: NUMBER, second: NUMBER): NUMBER")
|
|
10
|
+
@Name({"code": "en-US", "content": "Maximum Number"})
|
|
11
|
+
@Description({"code": "en-US", "content": "Compares two numbers and returns the maximum value."})
|
|
12
|
+
@DisplayMessage({"code": "en-US", "content": "Maximum of ${first} and ${second}"})
|
|
13
|
+
@Alias({"code": "en-US", "content": "max;maximum;largest;greatest;number;math;std"})
|
|
14
|
+
@DisplayIcon("tabler:math-function")
|
|
15
|
+
@Parameter({"runtime_name": "first", "name": [{"code": "en-US", "content": "First Number"}], "description": [{"code": "en-US", "content": "The first number to compare."}]})
|
|
16
|
+
@Parameter({"runtime_name": "second", "name": [{"code": "en-US", "content": "Second Number"}], "description": [{"code": "en-US", "content": "The second number to compare."}]})
|
|
17
|
+
class StdNumberMax(RuntimeFunctionRunnable):
|
|
18
|
+
def run(self, *args):
|
|
19
|
+
raise NotImplementedError("StdNumberMax.run() is not implemented")
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
from hercules.models.runtime_function import RuntimeFunctionRunnable
|
|
2
|
+
from hercules.decorators.meta import Alias, Description, DisplayIcon, DisplayMessage, Identifier, Name, Signature
|
|
3
|
+
from hercules.decorators.runtime_function import OmitRuntimeFunction
|
|
4
|
+
from hercules.decorators.function import Parameter
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
@OmitRuntimeFunction()
|
|
8
|
+
@Identifier("std::number::min")
|
|
9
|
+
@Signature("(first: NUMBER, second: NUMBER): NUMBER")
|
|
10
|
+
@Name({"code": "en-US", "content": "Minimum"})
|
|
11
|
+
@Description({"code": "en-US", "content": "Compares two numbers and returns the minimum value."})
|
|
12
|
+
@DisplayMessage({"code": "en-US", "content": "Minimum of ${first} and ${second}"})
|
|
13
|
+
@Alias({"code": "en-US", "content": "min;minimum;smallest;least;number;math;std"})
|
|
14
|
+
@DisplayIcon("tabler:math-function")
|
|
15
|
+
@Parameter({"runtime_name": "first", "name": [{"code": "en-US", "content": "First Number"}], "description": [{"code": "en-US", "content": "The first number to compare."}]})
|
|
16
|
+
@Parameter({"runtime_name": "second", "name": [{"code": "en-US", "content": "Second Number"}], "description": [{"code": "en-US", "content": "The second number to compare."}]})
|
|
17
|
+
class StdNumberMin(RuntimeFunctionRunnable):
|
|
18
|
+
def run(self, *args):
|
|
19
|
+
raise NotImplementedError("StdNumberMin.run() is not implemented")
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
from hercules.models.runtime_function import RuntimeFunctionRunnable
|
|
2
|
+
from hercules.decorators.meta import Alias, Description, DisplayIcon, DisplayMessage, Identifier, Name, Signature
|
|
3
|
+
from hercules.decorators.runtime_function import OmitRuntimeFunction
|
|
4
|
+
from hercules.decorators.function import Parameter
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
@OmitRuntimeFunction()
|
|
8
|
+
@Identifier("std::number::modulo")
|
|
9
|
+
@Signature("(first: NUMBER, second: NUMBER): NUMBER")
|
|
10
|
+
@Name({"code": "en-US", "content": "Modulo"})
|
|
11
|
+
@Description({"code": "en-US", "content": "Computes the modulus (remainder) of dividing the first numeric input by the second."})
|
|
12
|
+
@DisplayMessage({"code": "en-US", "content": "${first} Modulus ${second}"})
|
|
13
|
+
@Alias({"code": "en-US", "content": "modulo;mod;remainder;modulus;number;math;std"})
|
|
14
|
+
@DisplayIcon("tabler:math-function")
|
|
15
|
+
@Parameter({"runtime_name": "first", "name": [{"code": "en-US", "content": "Number"}], "description": [{"code": "en-US", "content": "The number to apply the modulo operator onto."}]})
|
|
16
|
+
@Parameter({"runtime_name": "second", "name": [{"code": "en-US", "content": "Modulo"}], "description": [{"code": "en-US", "content": "The modulo operator."}]})
|
|
17
|
+
class StdNumberModulo(RuntimeFunctionRunnable):
|
|
18
|
+
def run(self, *args):
|
|
19
|
+
raise NotImplementedError("StdNumberModulo.run() is not implemented")
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
from hercules.models.runtime_function import RuntimeFunctionRunnable
|
|
2
|
+
from hercules.decorators.meta import Alias, Description, DisplayIcon, DisplayMessage, Identifier, Name, Signature
|
|
3
|
+
from hercules.decorators.runtime_function import OmitRuntimeFunction
|
|
4
|
+
from hercules.decorators.function import Parameter
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
@OmitRuntimeFunction()
|
|
8
|
+
@Identifier("std::number::multiply")
|
|
9
|
+
@Signature("(first: NUMBER, second: NUMBER): NUMBER")
|
|
10
|
+
@Name({"code": "en-US", "content": "Multiply"})
|
|
11
|
+
@Description({"code": "en-US", "content": "Takes two numeric inputs and returns their product."})
|
|
12
|
+
@DisplayMessage({"code": "en-US", "content": "${first} Multiply by ${second}"})
|
|
13
|
+
@Alias({"code": "en-US", "content": "multiply;times;product;mul;number;math;std"})
|
|
14
|
+
@DisplayIcon("tabler:math-function")
|
|
15
|
+
@Parameter({"runtime_name": "first", "name": [{"code": "en-US", "content": "First Number"}], "description": [{"code": "en-US", "content": "The first number to multiply."}]})
|
|
16
|
+
@Parameter({"runtime_name": "second", "name": [{"code": "en-US", "content": "Second Number"}], "description": [{"code": "en-US", "content": "The second number to multiply."}]})
|
|
17
|
+
class StdNumberMultiply(RuntimeFunctionRunnable):
|
|
18
|
+
def run(self, *args):
|
|
19
|
+
raise NotImplementedError("StdNumberMultiply.run() is not implemented")
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
from hercules.models.runtime_function import RuntimeFunctionRunnable
|
|
2
|
+
from hercules.decorators.meta import Alias, Description, DisplayIcon, DisplayMessage, Identifier, Name, Signature
|
|
3
|
+
from hercules.decorators.runtime_function import OmitRuntimeFunction
|
|
4
|
+
from hercules.decorators.function import Parameter
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
@OmitRuntimeFunction()
|
|
8
|
+
@Identifier("std::number::negate")
|
|
9
|
+
@Signature("(value: NUMBER): NUMBER")
|
|
10
|
+
@Name({"code": "en-US", "content": "Negate"})
|
|
11
|
+
@Description({"code": "en-US", "content": "Returns the negation of a number (multiplies by -1)."})
|
|
12
|
+
@DisplayMessage({"code": "en-US", "content": "Negate ${value}"})
|
|
13
|
+
@Alias({"code": "en-US", "content": "negate;negative;invert;opposite;number;math;std"})
|
|
14
|
+
@DisplayIcon("tabler:math-function")
|
|
15
|
+
@Parameter({"runtime_name": "value", "name": [{"code": "en-US", "content": "Value"}], "description": [{"code": "en-US", "content": "The number to negate."}]})
|
|
16
|
+
class StdNumberNegate(RuntimeFunctionRunnable):
|
|
17
|
+
def run(self, *args):
|
|
18
|
+
raise NotImplementedError("StdNumberNegate.run() is not implemented")
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
from hercules.models.runtime_function import RuntimeFunctionRunnable
|
|
2
|
+
from hercules.decorators.meta import Alias, Description, DisplayIcon, DisplayMessage, Identifier, Name, Signature
|
|
3
|
+
from hercules.decorators.runtime_function import OmitRuntimeFunction
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
@OmitRuntimeFunction()
|
|
7
|
+
@Identifier("std::number::pi")
|
|
8
|
+
@Signature("(): NUMBER")
|
|
9
|
+
@Name({"code": "en-US", "content": "Pi"})
|
|
10
|
+
@Description({"code": "en-US", "content": "Provides the constant value of pi, approximately 3.14159, used in many mathematical calculations."})
|
|
11
|
+
@DisplayMessage({"code": "en-US", "content": "Pi"})
|
|
12
|
+
@Alias({"code": "en-US", "content": "pi;number;math;std"})
|
|
13
|
+
@DisplayIcon("tabler:math-function")
|
|
14
|
+
class StdNumberPi(RuntimeFunctionRunnable):
|
|
15
|
+
def run(self, *args):
|
|
16
|
+
raise NotImplementedError("StdNumberPi.run() is not implemented")
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
from hercules.models.runtime_function import RuntimeFunctionRunnable
|
|
2
|
+
from hercules.decorators.meta import Alias, Description, DisplayIcon, DisplayMessage, Identifier, Name, Signature
|
|
3
|
+
from hercules.decorators.runtime_function import OmitRuntimeFunction
|
|
4
|
+
from hercules.decorators.function import Parameter
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
@OmitRuntimeFunction()
|
|
8
|
+
@Identifier("std::number::random_number")
|
|
9
|
+
@Signature("(min: NUMBER, max: NUMBER): NUMBER")
|
|
10
|
+
@Name({"code": "en-US", "content": "Random Number"})
|
|
11
|
+
@Description({"code": "en-US", "content": "Returns a randomly generated number within the given range, inclusive of both minimum and maximum."})
|
|
12
|
+
@DisplayMessage({"code": "en-US", "content": "Random Number Between ${min} and ${max}"})
|
|
13
|
+
@Alias({"code": "en-US", "content": "random;rand;random number;number;math;std"})
|
|
14
|
+
@DisplayIcon("tabler:math-function")
|
|
15
|
+
@Parameter({"runtime_name": "min", "name": [{"code": "en-US", "content": "Minimum Value"}], "description": [{"code": "en-US", "content": "Defines the lower bound (inclusive) for the random number generation."}]})
|
|
16
|
+
@Parameter({"runtime_name": "max", "name": [{"code": "en-US", "content": "Maximum Value"}], "description": [{"code": "en-US", "content": "Defines the upper bound (inclusive) for the random number generation."}]})
|
|
17
|
+
class StdNumberRandomNumber(RuntimeFunctionRunnable):
|
|
18
|
+
def run(self, *args):
|
|
19
|
+
raise NotImplementedError("StdNumberRandomNumber.run() is not implemented")
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
from hercules.models.runtime_function import RuntimeFunctionRunnable
|
|
2
|
+
from hercules.decorators.meta import Alias, Description, DisplayIcon, DisplayMessage, Identifier, Name, Signature
|
|
3
|
+
from hercules.decorators.runtime_function import OmitRuntimeFunction
|
|
4
|
+
from hercules.decorators.function import Parameter
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
@OmitRuntimeFunction()
|
|
8
|
+
@Identifier("std::number::remove_digits")
|
|
9
|
+
@Signature("(number: NUMBER): NUMBER")
|
|
10
|
+
@Name({"code": "en-US", "content": "Remove Digits from Number"})
|
|
11
|
+
@Description({"code": "en-US", "content": "Removes all digit characters from the input number, effectively stripping it down to its non-digit components."})
|
|
12
|
+
@DisplayMessage({"code": "en-US", "content": "Remove Digits from ${number}"})
|
|
13
|
+
@Alias({"code": "en-US", "content": "remove:digits;strip;number;math;std"})
|
|
14
|
+
@DisplayIcon("tabler:math-function")
|
|
15
|
+
@Parameter({"runtime_name": "number", "name": [{"code": "en-US", "content": "Number Input"}], "description": [{"code": "en-US", "content": "This is the numeric input. The result will be its value without any digits."}]})
|
|
16
|
+
class StdNumberRemoveDigits(RuntimeFunctionRunnable):
|
|
17
|
+
def run(self, *args):
|
|
18
|
+
raise NotImplementedError("StdNumberRemoveDigits.run() is not implemented")
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
from hercules.models.runtime_function import RuntimeFunctionRunnable
|
|
2
|
+
from hercules.decorators.meta import Alias, Description, DisplayIcon, DisplayMessage, Identifier, Name, Signature
|
|
3
|
+
from hercules.decorators.runtime_function import OmitRuntimeFunction
|
|
4
|
+
from hercules.decorators.function import Parameter
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
@OmitRuntimeFunction()
|
|
8
|
+
@Identifier("std::number::root")
|
|
9
|
+
@Signature("(value: NUMBER, root_exponent: NUMBER): NUMBER")
|
|
10
|
+
@Name({"code": "en-US", "content": "Root"})
|
|
11
|
+
@Description({"code": "en-US", "content": "Calculates the nth root of the input number, where n is specified by the root exponent."})
|
|
12
|
+
@DisplayMessage({"code": "en-US", "content": "${root_exponent} Root of ${value}"})
|
|
13
|
+
@Alias({"code": "en-US", "content": "root;nth root;number;math;std"})
|
|
14
|
+
@DisplayIcon("tabler:math-function")
|
|
15
|
+
@Parameter({"runtime_name": "value", "name": [{"code": "en-US", "content": "Input Value"}], "description": [{"code": "en-US", "content": "The numeric input for which the root will be calculated."}]})
|
|
16
|
+
@Parameter({"runtime_name": "root_exponent", "name": [{"code": "en-US", "content": "Root Exponent"}], "description": [{"code": "en-US", "content": "The degree of the root to extract."}]})
|
|
17
|
+
class StdNumberRoot(RuntimeFunctionRunnable):
|
|
18
|
+
def run(self, *args):
|
|
19
|
+
raise NotImplementedError("StdNumberRoot.run() is not implemented")
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
from hercules.models.runtime_function import RuntimeFunctionRunnable
|
|
2
|
+
from hercules.decorators.meta import Alias, Description, DisplayIcon, DisplayMessage, Identifier, Name, Signature
|
|
3
|
+
from hercules.decorators.runtime_function import OmitRuntimeFunction
|
|
4
|
+
from hercules.decorators.function import Parameter
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
@OmitRuntimeFunction()
|
|
8
|
+
@Identifier("std::number::round")
|
|
9
|
+
@Signature("(value: NUMBER, decimals: NUMBER): NUMBER")
|
|
10
|
+
@Name({"code": "en-US", "content": "Round Number"})
|
|
11
|
+
@Description({"code": "en-US", "content": "Rounds a number to the nearest value at the specified number of decimal places."})
|
|
12
|
+
@DisplayMessage({"code": "en-US", "content": "Round ${value} with ${decimals} Decimal Places"})
|
|
13
|
+
@Alias({"code": "en-US", "content": "round;nearest;approximate;number;math;std"})
|
|
14
|
+
@DisplayIcon("tabler:math-function")
|
|
15
|
+
@Parameter({"runtime_name": "value", "name": [{"code": "en-US", "content": "Value"}], "description": [{"code": "en-US", "content": "The numeric input that will be rounded to the nearest value."}]})
|
|
16
|
+
@Parameter({"runtime_name": "decimals", "name": [{"code": "en-US", "content": "Decimal Places"}], "description": [{"code": "en-US", "content": "Specifies how many decimal digits to keep after rounding."}]})
|
|
17
|
+
class StdNumberRound(RuntimeFunctionRunnable):
|
|
18
|
+
def run(self, *args):
|
|
19
|
+
raise NotImplementedError("StdNumberRound.run() is not implemented")
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
from hercules.models.runtime_function import RuntimeFunctionRunnable
|
|
2
|
+
from hercules.decorators.meta import Alias, Description, DisplayIcon, DisplayMessage, Identifier, Name, Signature
|
|
3
|
+
from hercules.decorators.runtime_function import OmitRuntimeFunction
|
|
4
|
+
from hercules.decorators.function import Parameter
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
@OmitRuntimeFunction()
|
|
8
|
+
@Identifier("std::number::round_down")
|
|
9
|
+
@Signature("(value: NUMBER, decimals: NUMBER): NUMBER")
|
|
10
|
+
@Name({"code": "en-US", "content": "Round Number Down"})
|
|
11
|
+
@Description({"code": "en-US", "content": "Rounds a number downward to the specified number of decimal places."})
|
|
12
|
+
@DisplayMessage({"code": "en-US", "content": "Round Down ${value} with ${decimals} Decimal Places"})
|
|
13
|
+
@Alias({"code": "en-US", "content": "round down;floor;number;math;std;round;down"})
|
|
14
|
+
@DisplayIcon("tabler:math-function")
|
|
15
|
+
@Parameter({"runtime_name": "value", "name": [{"code": "en-US", "content": "Value"}], "description": [{"code": "en-US", "content": "The numeric input that will be rounded downwards."}]})
|
|
16
|
+
@Parameter({"runtime_name": "decimals", "name": [{"code": "en-US", "content": "Decimal Places"}], "description": [{"code": "en-US", "content": "Specifies how many decimal digits to keep after rounding down."}]})
|
|
17
|
+
class StdNumberRoundDown(RuntimeFunctionRunnable):
|
|
18
|
+
def run(self, *args):
|
|
19
|
+
raise NotImplementedError("StdNumberRoundDown.run() is not implemented")
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
from hercules.models.runtime_function import RuntimeFunctionRunnable
|
|
2
|
+
from hercules.decorators.meta import Alias, Description, DisplayIcon, DisplayMessage, Identifier, Name, Signature
|
|
3
|
+
from hercules.decorators.runtime_function import OmitRuntimeFunction
|
|
4
|
+
from hercules.decorators.function import Parameter
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
@OmitRuntimeFunction()
|
|
8
|
+
@Identifier("std::number::round_up")
|
|
9
|
+
@Signature("(value: NUMBER, decimals: NUMBER): NUMBER")
|
|
10
|
+
@Name({"code": "en-US", "content": "Round Up"})
|
|
11
|
+
@Description({"code": "en-US", "content": "Performs rounding on the given value, always rounding up to the nearest value at the given decimal precision."})
|
|
12
|
+
@DisplayMessage({"code": "en-US", "content": "Round Upwards ${value} with ${decimals} Decimal Places"})
|
|
13
|
+
@Alias({"code": "en-US", "content": "round up;ceil;ceiling;number;math;std;round;up"})
|
|
14
|
+
@DisplayIcon("tabler:math-function")
|
|
15
|
+
@Parameter({"runtime_name": "value", "name": [{"code": "en-US", "content": "Number Input"}], "description": [{"code": "en-US", "content": "The number to be rounded up."}]})
|
|
16
|
+
@Parameter({"runtime_name": "decimals", "name": [{"code": "en-US", "content": "Decimal Places"}], "description": [{"code": "en-US", "content": "The number of decimal places to round up to."}]})
|
|
17
|
+
class StdNumberRoundUp(RuntimeFunctionRunnable):
|
|
18
|
+
def run(self, *args):
|
|
19
|
+
raise NotImplementedError("StdNumberRoundUp.run() is not implemented")
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
from hercules.models.runtime_function import RuntimeFunctionRunnable
|
|
2
|
+
from hercules.decorators.meta import Alias, Description, DisplayIcon, DisplayMessage, Identifier, Name, Signature
|
|
3
|
+
from hercules.decorators.runtime_function import OmitRuntimeFunction
|
|
4
|
+
from hercules.decorators.function import Parameter
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
@OmitRuntimeFunction()
|
|
8
|
+
@Identifier("std::number::sin")
|
|
9
|
+
@Signature("(value: NUMBER): NUMBER")
|
|
10
|
+
@Name({"code": "en-US", "content": "Sine"})
|
|
11
|
+
@Description({"code": "en-US", "content": "Calculates the sine of the input value."})
|
|
12
|
+
@DisplayMessage({"code": "en-US", "content": "Sine of ${value}"})
|
|
13
|
+
@Alias({"code": "en-US", "content": "sin;sine;trigonometry;number;math;std"})
|
|
14
|
+
@DisplayIcon("tabler:math-function")
|
|
15
|
+
@Parameter({"runtime_name": "value", "name": [{"code": "en-US", "content": "Number Input"}], "description": [{"code": "en-US", "content": "The number for which to calculate the sine."}]})
|
|
16
|
+
class StdNumberSin(RuntimeFunctionRunnable):
|
|
17
|
+
def run(self, *args):
|
|
18
|
+
raise NotImplementedError("StdNumberSin.run() is not implemented")
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
from hercules.models.runtime_function import RuntimeFunctionRunnable
|
|
2
|
+
from hercules.decorators.meta import Alias, Description, DisplayIcon, DisplayMessage, Identifier, Name, Signature
|
|
3
|
+
from hercules.decorators.runtime_function import OmitRuntimeFunction
|
|
4
|
+
from hercules.decorators.function import Parameter
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
@OmitRuntimeFunction()
|
|
8
|
+
@Identifier("std::number::sinh")
|
|
9
|
+
@Signature("(value: NUMBER): NUMBER")
|
|
10
|
+
@Name({"code": "en-US", "content": "Hyperbolic Sine"})
|
|
11
|
+
@Description({"code": "en-US", "content": "Calculates the hyperbolic sine (sinh) of the input value."})
|
|
12
|
+
@DisplayMessage({"code": "en-US", "content": "Hyperbolic Sine of ${value}"})
|
|
13
|
+
@Alias({"code": "en-US", "content": "sinh;hyperbolic sine;number;math;std"})
|
|
14
|
+
@DisplayIcon("tabler:math-function")
|
|
15
|
+
@Parameter({"runtime_name": "value", "name": [{"code": "en-US", "content": "Number Input"}], "description": [{"code": "en-US", "content": "The number for which to calculate the hyperbolic sine."}]})
|
|
16
|
+
class StdNumberSinh(RuntimeFunctionRunnable):
|
|
17
|
+
def run(self, *args):
|
|
18
|
+
raise NotImplementedError("StdNumberSinh.run() is not implemented")
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
from hercules.models.runtime_function import RuntimeFunctionRunnable
|
|
2
|
+
from hercules.decorators.meta import Alias, Description, DisplayIcon, DisplayMessage, Identifier, Name, Signature
|
|
3
|
+
from hercules.decorators.runtime_function import OmitRuntimeFunction
|
|
4
|
+
from hercules.decorators.function import Parameter
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
@OmitRuntimeFunction()
|
|
8
|
+
@Identifier("std::number::square")
|
|
9
|
+
@Signature("(value: NUMBER): NUMBER")
|
|
10
|
+
@Name({"code": "en-US", "content": "Square"})
|
|
11
|
+
@Description({"code": "en-US", "content": "Returns the square of the given number."})
|
|
12
|
+
@DisplayMessage({"code": "en-US", "content": "${value} Squared"})
|
|
13
|
+
@Alias({"code": "en-US", "content": "square;squared;power two;number;math;std"})
|
|
14
|
+
@DisplayIcon("tabler:math-function")
|
|
15
|
+
@Parameter({"runtime_name": "value", "name": [{"code": "en-US", "content": "Value"}], "description": [{"code": "en-US", "content": "The number to be squared."}]})
|
|
16
|
+
class StdNumberSquare(RuntimeFunctionRunnable):
|
|
17
|
+
def run(self, *args):
|
|
18
|
+
raise NotImplementedError("StdNumberSquare.run() is not implemented")
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
from hercules.models.runtime_function import RuntimeFunctionRunnable
|
|
2
|
+
from hercules.decorators.meta import Alias, Description, DisplayIcon, DisplayMessage, Identifier, Name, Signature
|
|
3
|
+
from hercules.decorators.runtime_function import OmitRuntimeFunction
|
|
4
|
+
from hercules.decorators.function import Parameter
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
@OmitRuntimeFunction()
|
|
8
|
+
@Identifier("std::number::square_root")
|
|
9
|
+
@Signature("(value: NUMBER): NUMBER")
|
|
10
|
+
@Name({"code": "en-US", "content": "Square Root"})
|
|
11
|
+
@Description({"code": "en-US", "content": "Calculates the positive square root of the input number."})
|
|
12
|
+
@DisplayMessage({"code": "en-US", "content": "Square Root of ${value}"})
|
|
13
|
+
@Alias({"code": "en-US", "content": "square root;sqrt;root;number;math;std;square"})
|
|
14
|
+
@DisplayIcon("tabler:math-function")
|
|
15
|
+
@Parameter({"runtime_name": "value", "name": [{"code": "en-US", "content": "Value"}], "description": [{"code": "en-US", "content": "The number to find the square root of."}]})
|
|
16
|
+
class StdNumberSquareRoot(RuntimeFunctionRunnable):
|
|
17
|
+
def run(self, *args):
|
|
18
|
+
raise NotImplementedError("StdNumberSquareRoot.run() is not implemented")
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
from hercules.models.runtime_function import RuntimeFunctionRunnable
|
|
2
|
+
from hercules.decorators.meta import Alias, Description, DisplayIcon, DisplayMessage, Identifier, Name, Signature
|
|
3
|
+
from hercules.decorators.runtime_function import OmitRuntimeFunction
|
|
4
|
+
from hercules.decorators.function import Parameter
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
@OmitRuntimeFunction()
|
|
8
|
+
@Identifier("std::number::subtract")
|
|
9
|
+
@Signature("(first: NUMBER, second: NUMBER): NUMBER")
|
|
10
|
+
@Name({"code": "en-US", "content": "Subtract"})
|
|
11
|
+
@Description({"code": "en-US", "content": "Subtracts the second number from the first number."})
|
|
12
|
+
@DisplayMessage({"code": "en-US", "content": "${first} Minus ${second}"})
|
|
13
|
+
@Alias({"code": "en-US", "content": "subtract;minus;difference;sub;number;math;std"})
|
|
14
|
+
@DisplayIcon("tabler:math-function")
|
|
15
|
+
@Parameter({"runtime_name": "first", "name": [{"code": "en-US", "content": "Minuend"}], "description": [{"code": "en-US", "content": "The number from which another number (the subtrahend) is to be subtracted."}]})
|
|
16
|
+
@Parameter({"runtime_name": "second", "name": [{"code": "en-US", "content": "Subtrahend"}], "description": [{"code": "en-US", "content": "The number to subtract from the first number (the minuend)."}]})
|
|
17
|
+
class StdNumberSubtract(RuntimeFunctionRunnable):
|
|
18
|
+
def run(self, *args):
|
|
19
|
+
raise NotImplementedError("StdNumberSubtract.run() is not implemented")
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
from hercules.models.runtime_function import RuntimeFunctionRunnable
|
|
2
|
+
from hercules.decorators.meta import Alias, Description, DisplayIcon, DisplayMessage, Identifier, Name, Signature
|
|
3
|
+
from hercules.decorators.runtime_function import OmitRuntimeFunction
|
|
4
|
+
from hercules.decorators.function import Parameter
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
@OmitRuntimeFunction()
|
|
8
|
+
@Identifier("std::number::tan")
|
|
9
|
+
@Signature("(radians: NUMBER): NUMBER")
|
|
10
|
+
@Name({"code": "en-US", "content": "Tangent"})
|
|
11
|
+
@Description({"code": "en-US", "content": "Calculates the tangent value of the input angle measured in radians."})
|
|
12
|
+
@DisplayMessage({"code": "en-US", "content": "Tangent of ${radians}"})
|
|
13
|
+
@Alias({"code": "en-US", "content": "tan;tangent;trigonometry;number;math;std"})
|
|
14
|
+
@DisplayIcon("tabler:math-function")
|
|
15
|
+
@Parameter({"runtime_name": "radians", "name": [{"code": "en-US", "content": "Radians"}], "description": [{"code": "en-US", "content": "Computes the tangent of the given angle in radians."}]})
|
|
16
|
+
class StdNumberTan(RuntimeFunctionRunnable):
|
|
17
|
+
def run(self, *args):
|
|
18
|
+
raise NotImplementedError("StdNumberTan.run() is not implemented")
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from pydantic import BaseModel, ConfigDict
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class Object(BaseModel):
|
|
7
|
+
model_config = ConfigDict(
|
|
8
|
+
extra='forbid',
|
|
9
|
+
)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
from hercules.internal.schema import register_schema
|
|
13
|
+
register_schema(Object, "OBJECT")
|
|
File without changes
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
from hercules.models.runtime_function import RuntimeFunctionRunnable
|
|
2
|
+
from hercules.decorators.meta import Alias, Description, DisplayIcon, DisplayMessage, Identifier, Name, Signature
|
|
3
|
+
from hercules.decorators.runtime_function import OmitRuntimeFunction
|
|
4
|
+
from hercules.decorators.function import Parameter
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
@OmitRuntimeFunction()
|
|
8
|
+
@Identifier("std::object::contains_key")
|
|
9
|
+
@Signature("<T>(object: OBJECT<T>, key: keyof OBJECT<T> | string): BOOLEAN")
|
|
10
|
+
@Name({"code": "en-US", "content": "Contains Key"})
|
|
11
|
+
@Description({"code": "en-US", "content": "Returns true if the given key is a property of the object; otherwise, returns false."})
|
|
12
|
+
@DisplayMessage({"code": "en-US", "content": "Checks if ${object} Contains ${key}"})
|
|
13
|
+
@Alias({"code": "en-US", "content": "contains_key;object;std;contains;key"})
|
|
14
|
+
@DisplayIcon("tabler:cube")
|
|
15
|
+
@Parameter({"runtime_name": "object", "name": [{"code": "en-US", "content": "Object"}], "description": [{"code": "en-US", "content": "The object to check for the presence of a key."}]})
|
|
16
|
+
@Parameter({"runtime_name": "key", "name": [{"code": "en-US", "content": "Key"}], "description": [{"code": "en-US", "content": "The key to check for existence in the object."}]})
|
|
17
|
+
class StdObjectContainsKey(RuntimeFunctionRunnable):
|
|
18
|
+
def run(self, *args):
|
|
19
|
+
raise NotImplementedError("StdObjectContainsKey.run() is not implemented")
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
from hercules.models.runtime_function import RuntimeFunctionRunnable
|
|
2
|
+
from hercules.decorators.meta import Alias, Description, DisplayIcon, DisplayMessage, Identifier, Name, Signature
|
|
3
|
+
from hercules.decorators.runtime_function import OmitRuntimeFunction
|
|
4
|
+
from hercules.decorators.function import Parameter
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
@OmitRuntimeFunction()
|
|
8
|
+
@Identifier("std::object::get")
|
|
9
|
+
@Signature("<T, K extends keyof T>(object: OBJECT<T>, key: K | string): T[K]")
|
|
10
|
+
@Name({"code": "en-US", "content": "Get key of object"})
|
|
11
|
+
@Description({"code": "en-US", "content": "Returns the value of a key inside of the object."})
|
|
12
|
+
@DisplayMessage({"code": "en-US", "content": "Get ${key} of ${object}"})
|
|
13
|
+
@Alias({"code": "en-US", "content": "get;object;std"})
|
|
14
|
+
@DisplayIcon("tabler:cube")
|
|
15
|
+
@Parameter({"runtime_name": "object", "name": [{"code": "en-US", "content": "Object"}], "description": [{"code": "en-US", "content": "The object that contains the value referenced by the key."}]})
|
|
16
|
+
@Parameter({"runtime_name": "key", "name": [{"code": "en-US", "content": "Key"}], "description": [{"code": "en-US", "content": "The property name under which the value will be referenced."}]})
|
|
17
|
+
class StdObjectGet(RuntimeFunctionRunnable):
|
|
18
|
+
def run(self, *args):
|
|
19
|
+
raise NotImplementedError("StdObjectGet.run() is not implemented")
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
from hercules.models.runtime_function import RuntimeFunctionRunnable
|
|
2
|
+
from hercules.decorators.meta import Alias, Description, DisplayIcon, DisplayMessage, Identifier, Name, Signature
|
|
3
|
+
from hercules.decorators.runtime_function import OmitRuntimeFunction
|
|
4
|
+
from hercules.decorators.function import Parameter
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
@OmitRuntimeFunction()
|
|
8
|
+
@Identifier("std::object::keys")
|
|
9
|
+
@Signature("<T>(object: OBJECT<T>): LIST<keyof OBJECT<T>>")
|
|
10
|
+
@Name({"code": "en-US", "content": "Get Object Keys"})
|
|
11
|
+
@Description({"code": "en-US", "content": "Returns a list containing all keys of the specified object."})
|
|
12
|
+
@DisplayMessage({"code": "en-US", "content": "Keys of ${object}"})
|
|
13
|
+
@Alias({"code": "en-US", "content": "keys;object;std"})
|
|
14
|
+
@DisplayIcon("tabler:cube")
|
|
15
|
+
@Parameter({"runtime_name": "object", "name": [{"code": "en-US", "content": "Object"}], "description": [{"code": "en-US", "content": "Returns a list of all the keys (property names) of the given object."}]})
|
|
16
|
+
class StdObjectKeys(RuntimeFunctionRunnable):
|
|
17
|
+
def run(self, *args):
|
|
18
|
+
raise NotImplementedError("StdObjectKeys.run() is not implemented")
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
from hercules.models.runtime_function import RuntimeFunctionRunnable
|
|
2
|
+
from hercules.decorators.meta import Alias, Description, DisplayIcon, DisplayMessage, Identifier, Name, Signature
|
|
3
|
+
from hercules.decorators.runtime_function import OmitRuntimeFunction
|
|
4
|
+
from hercules.decorators.function import Parameter
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
@OmitRuntimeFunction()
|
|
8
|
+
@Identifier("std::object::set")
|
|
9
|
+
@Signature("<T, K extends TEXT, V>(object: OBJECT<T>, key: K, value: V): OBJECT<T & { [P in K]: V }>")
|
|
10
|
+
@Name({"code": "en-US", "content": "Set Object Key"})
|
|
11
|
+
@Description({"code": "en-US", "content": "Returns a new object with the specified key set to the given value."})
|
|
12
|
+
@DisplayMessage({"code": "en-US", "content": "Set ${key} to ${value} of ${object}"})
|
|
13
|
+
@Alias({"code": "en-US", "content": "set;object;std"})
|
|
14
|
+
@DisplayIcon("tabler:cube")
|
|
15
|
+
@Parameter({"runtime_name": "object", "name": [{"code": "en-US", "content": "Object"}], "description": [{"code": "en-US", "content": "The original object that will be modified with the specified key-value pair."}]})
|
|
16
|
+
@Parameter({"runtime_name": "key", "name": [{"code": "en-US", "content": "Key"}], "description": [{"code": "en-US", "content": "The property name under which the value will be stored in the object."}]})
|
|
17
|
+
@Parameter({"runtime_name": "value", "name": [{"code": "en-US", "content": "Value"}], "description": [{"code": "en-US", "content": "The value to assign to the object property identified by the key."}]})
|
|
18
|
+
class StdObjectSet(RuntimeFunctionRunnable):
|
|
19
|
+
def run(self, *args):
|
|
20
|
+
raise NotImplementedError("StdObjectSet.run() is not implemented")
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
from hercules.models.runtime_function import RuntimeFunctionRunnable
|
|
2
|
+
from hercules.decorators.meta import Alias, Description, DisplayIcon, DisplayMessage, Identifier, Name, Signature
|
|
3
|
+
from hercules.decorators.runtime_function import OmitRuntimeFunction
|
|
4
|
+
from hercules.decorators.function import Parameter
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
@OmitRuntimeFunction()
|
|
8
|
+
@Identifier("std::object::size")
|
|
9
|
+
@Signature("<T>(object: OBJECT<T>): NUMBER")
|
|
10
|
+
@Name({"code": "en-US", "content": "Get Object Size"})
|
|
11
|
+
@Description({"code": "en-US", "content": "Returns an integer count of all enumerable property keys in the specified object."})
|
|
12
|
+
@DisplayMessage({"code": "en-US", "content": "Size of ${object}"})
|
|
13
|
+
@Alias({"code": "en-US", "content": "size;object;std"})
|
|
14
|
+
@DisplayIcon("tabler:cube")
|
|
15
|
+
@Parameter({"runtime_name": "object", "name": [{"code": "en-US", "content": "Object"}], "description": [{"code": "en-US", "content": "Returns the number of keys present in the given object."}]})
|
|
16
|
+
class StdObjectSize(RuntimeFunctionRunnable):
|
|
17
|
+
def run(self, *args):
|
|
18
|
+
raise NotImplementedError("StdObjectSize.run() is not implemented")
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from typing import Literal
|
|
4
|
+
|
|
5
|
+
from pydantic import RootModel
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class TextEncoding(RootModel[Literal['BASE64']]):
|
|
9
|
+
root: Literal['BASE64']
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
from hercules.internal.schema import register_schema
|
|
13
|
+
register_schema(TextEncoding, "TEXT_ENCODING")
|
|
File without changes
|