Skip to main content

Data Types

Lunar provides a comprehensive set of data types for data validation between components in a workflow and ensures the correct visual representation of the data on the interface (Lunarflow).

Basic Types

NamePrimitive TypeDescription
TEXTstrRepresents text data
INTintRepresents integer values
FLOATfloatRepresents floating-point numbers
BOOLboolRepresents boolean values
NULLNoneRepresents null/None values
ANYanyRepresents any data type (use with caution)

File and Media Types

NamePrimitive TypeDescription
FILEFileRepresents a file object
IMAGEstrBase64 string representation of an image
AUDIOstrBase64 string representation of audio data
CSVstrRepresents CSV formatted text

Code and Query Types

NamePrimitive TypeDescription
CODEstrRepresents Python code
R_CODEstrRepresents R code
SPARQLstrRepresents a SPARQL query
SQLstrRepresents an SQL query
GRAPHQLstrRepresents a GraphQL query

Data Processing Types

NamePrimitive TypeDescription
EMBEDDINGSlistRepresents embeddings as a list of floats
JSONdictRepresents a JSON object
LISTlistRepresents a list of items
AGGREGATEDdictAllows the input to receive multiple outputs as a dictionary

UI Components

NamePrimitive TypeDescription
SELECTSelectRepresents a selection component with predefined options
PROPERTY_SELECTORstrDisplays a property selector component on the interface
PROPERTY_GETTERstrDisplays a property getter component on the interface
LIST_INDEX_GETTERstrAllows getting specific items from a list

Visualization Types

NamePrimitive TypeDescription
BAR_CHARTdictRepresents bar chart visualization data
LINE_CHARTdictRepresents line chart visualization data
BSGN_GRAPHdictRepresents BSGN graph visualization data
CYTOSCAPEdictRepresents Cytoscape graph visualization data

Workflow Types

NamePrimitive TypeDescription
WORKFLOWUnion[str, dict]Represents a workflow. Used to run workflows recursively
TEMPLATEstrRepresents a template with replaceable variables
REPORTstrRepresents a report. Allows the creation of an editable rich text editor

Security Types

NamePrimitive TypeDescription
PASSWORDstrRepresents a password value (should be handled securely)

Stream Types

NamePrimitive TypeDescription
STREAMGeneratorTypeRepresents a stream of data (for real-time processing)

Special Types

NamePrimitive TypeDescription
ANYanyRepresents any data type (use with caution)
NULLNoneRepresents null/None values