Template Functions¶
-
class
wishbone.function.template.choice.
Choice
(values)[source]¶ Returns a random element from the provided values.
A Wishbone template function which returns a random element from the provided values.
Parameters: values¶ – An list of elements to choose from
-
class
wishbone.function.template.cycle.
Cycle
(values)[source]¶ Cycles through the provided array returning the next element.
A Wishbone template function which returns the next value of an array.
This function rotates through the elements in the provided array always returning the next element. The order is fixed and when the end is reached the first element is returned again.
Parameters: values¶ – A list of elements to cycle through.
-
class
wishbone.function.template.environment.
Environment
[source]¶ Returns environment variables
A Wishbone template function wich return environment variables.
Parameters: None¶ –
-
class
wishbone.function.template.epoch.
Epoch
[source]¶ Returns epoch with sub second accuracy as a float.
A Wishbone template function which returns the PID of the current process.
Parameters: None¶ –
-
class
wishbone.function.template.pid.
PID
[source]¶ Returns the PID of the current process.
A Wishbone template function which returns the PID of the current process.
Parameters: None¶ –
-
class
wishbone.function.template.random_bool.
RandomBool
[source]¶ Randomly returns True or False.
A Wishbone template function which returns a random bool.
Parameters: None¶ –
-
class
wishbone.function.template.random_integer.
RandomInteger
(minimum=0, maximum=0)[source]¶ Returns a random integer.
A Wishbone template function which returns a random integer between <min> and <max>.
Parameters:
-
class
wishbone.function.template.random_uuid.
RandomUUID
[source]¶ Returns a UUID value.
A Wishbone template function which returns a UUID.
Parameters: None¶ –
-
class
wishbone.function.template.random_word.
RandomWord
(filename=None, encoding='latin-1')[source]¶ Returns a random word.
A Wishbone template function which returns a randomly selected word from a word list.
Parameters:
-
class
wishbone.function.template.regex.
Regex
[source]¶ Regex matching on a string.
A wishbone template function to do regex matching on strings. Useful for conditional statements.
Parameters: None¶ –