Engee documentation

Genie’s Public Software Management Methods

Page in progress.

An example of creating a simple application using the Genie framework is also presented in Community Engee.

All public software management methods of genie for working with the framework are presented here. Genie. To use them in Genie applications, connect the Engee tool library using the using Engee command inside your code (app.jl).

Genie methods

engee.genie.start(app_path::String; devel::Bool=false, log_file::String="")

Launches the Genie application using the specified path.

Before usage of the command engee.genie.start make sure that if the application is a directory, it contains a file with the application code and extension.jl. Also delete the config and *.toml files (if present).

Arguments

  • app_path::String: path to the application directory. It can be relative or absolute.

  • devel::Bool=false: A parameter for enabling development mode, in which changes to the code are applied without restarting the application.

  • log_file::String="": parameter for specifying the path to the log file. If not specified, the logs are not saved separately.

Examples

# Launching Genie via the app.jl application file, without development mode and saving logs
engee.genie.start("/user/app.jl")

# Launching Genie via the app file.jl, with development mode and log saving
engee.genie.start("/user/app.jl", devel=true, log_file="/user/logs.txt")
engee.genie.stop(app_path::String)

Stops the running Genie application.

Arguments

app_path::String: path to the application directory. It can be relative or absolute.

Examples

# Stopping the app on an absolute path
engee.genie.stop("/user/app.jl")

# Stopping the app by relative path
engee.genie.stop("app.jl")
engee.genie.list()

Displays a list of all running Genie applications.

Examples

engee.genie.list()
engee.genie.eval(code::AbstractString)

Executes the specified code in the Engee workspace outside the context of the running Genie application. It is used to run individual expressions, debug, or dynamically execute code without having to restart the application.

Arguments

code::AbstractString: a line of code on Julia, which will be executed in the workspace Engee.

Examples

engee.genie.eval("x = 5")
engee.genie.recv(wsVarName::AbstractString; context::Module=GenieAPI )

Returns the value of a variable from the specified context (module) in the Engee workspace during the execution of the Genie application.

By default, the variable is searched in the module GenieAPI, but if necessary, you can explicitly specify another module through the parameter context. So, if the variable is defined in another module, then the parameter is used context, indicating in which namespace to search for it.

Arguments

  • wsVarName::AbstractString: name of the variable whose value you want to get.

  • context::Module=GenieAPI: the module in which the variable is searched. It is specified explicitly if the variable does not belong to the module GenieAPI.

Examples

# Getting the value of variable x from the Main module
engee.genie.recv("x", Main)

# Getting the value of variable a from the module by default
engee.genie.recv("a")

# Getting the value of the value variable from the user module
engee.genie.recv("value"; context=MyModule)
engee.genie.send(wsVarName::AbstractString, value::Any)

Saves the value value to a variable wsVarName in the workspace Engee during the execution of the application on Genie.

If a variable with this name did not exist before, it will be created automatically. The function is convenient for transferring intermediate results or user data from the Genie application to the Engee session.

Arguments

  • wsVarName::AbstractString: name of the variable to which the value is assigned.

  • value::Any: the value to be stored in the variable. Can be of any type.

Examples

# Assigning variable x the value 124
engee.genie.send("x", 124)

# Saving a string in the message variable
engee.genie.send("message", "Hello")