Skip to content

← programming package

CreateDict

Create a dictionary (a lookup table from names to items) from a list of names and values.

Names must be contiguous, i.e., intermediate names that are None are not allowed. Data items may or may not be None, and whether such items are included in the output is governed by include_nones. This node is a companion to CreateStructure, which mainly differs in its default behavior, which treats None as a special value that is not included in the output. This node replaces CreateStructure, though its default behavior is different in two ways: If any in port that has a matching non-empty name property (i.e., the in2 port if the name2 property has a value) receives a None value, it will be included in the dictionary with a value of None (i.e., {"keyname": None}. To omit any keys with a matching in port that receives None set the include_nones property to False (this was the default in the CreateStructure node). If all of the in ports receive a value of None, then this node will emit an empty dictionary ({}). To have it emit None instead (which typically causes downstream nodes to skip processing), as in the CreateStructure node, set the none_if_empty property to True. Passing None can be useful in streaming pipelines to skip processing of downstream nodes when no values are being received, or for an offline pipeline to indicate that processing has finished. Version 1.0.0

Ports/Properties

outdict

Output dict.

verbose name
Outdict
default value
None
port type
DataPort
value type
dict (can be None)
data direction
OUT

name1

Name 1.

verbose name
Name1
default value
None
port type
StringPort
value type
str (can be None)

in1

Input 1.

verbose name
In1
default value
None
port type
DataPort
value type
object (can be None)
data direction
IN

name2

Name 2.

verbose name
Name2
default value
None
port type
StringPort
value type
str (can be None)

in2

Input 2.

verbose name
In2
default value
None
port type
DataPort
value type
object (can be None)
data direction
IN

name3

Name 3.

verbose name
Name3
default value
None
port type
StringPort
value type
str (can be None)

in3

Input 3.

verbose name
In3
default value
None
port type
DataPort
value type
object (can be None)
data direction
IN

name4

Name 4.

verbose name
Name4
default value
None
port type
StringPort
value type
str (can be None)

in4

Input 4.

verbose name
In4
default value
None
port type
DataPort
value type
object (can be None)
data direction
IN

name5

Name 5.

verbose name
Name5
default value
None
port type
StringPort
value type
str (can be None)

in5

Input 5.

verbose name
In5
default value
None
port type
DataPort
value type
object (can be None)
data direction
IN

name6

Name 6.

verbose name
Name6
default value
None
port type
StringPort
value type
str (can be None)

in6

Input 6.

verbose name
In6
default value
None
port type
DataPort
value type
object (can be None)
data direction
IN

name7

Name 7.

verbose name
Name7
default value
None
port type
StringPort
value type
str (can be None)

in7

Input 7.

verbose name
In7
default value
None
port type
DataPort
value type
object (can be None)
data direction
IN

name8

Name 8.

verbose name
Name8
default value
None
port type
StringPort
value type
str (can be None)

in8

Input 8.

verbose name
In8
default value
None
port type
DataPort
value type
object (can be None)
data direction
IN

name9

Name 9.

verbose name
Name9
default value
None
port type
StringPort
value type
str (can be None)

in9

Input 9.

verbose name
In9
default value
None
port type
DataPort
value type
object (can be None)
data direction
IN

nameN

Additional item names in list form.

verbose name
Additional Names
default value
None
port type
ListPort
value type
list (can be None)

inN

Additional data inputs.

verbose name
Inn
default value
None
port type
DataPort
value type
list (can be None)
data direction
IN

include_nones

Include named inputs in the dictionary even if they have a value of None.

verbose name
Include None Data
default value
True
port type
BoolPort
value type
bool (can be None)

none_if_empty

Output None if all inputs are empty.

verbose name
Output None If All Empty
default value
False
port type
BoolPort
value type
bool (can be None)

verbose

Enable verbose diagnostics output.

verbose name
Verbose
default value
False
port type
BoolPort
value type
bool (can be None)

name0

Name 0.

verbose name
Name0
default value
None
port type
StringPort
value type
str (can be None)

in0

Input 0.

verbose name
In0
default value
None
port type
DataPort
value type
object (can be None)
data direction
IN

set_breakpoint

Set a breakpoint on this node. If this is enabled, your debugger (if one is attached) will trigger a breakpoint.

verbose name
Set Breakpoint (Debug Only)
default value
False
port type
BoolPort
value type
bool (can be None)

metadata

User-definable meta-data associated with the node. Usually reserved for technical purposes.

verbose name
Metadata
default value
{}
port type
DictPort
value type
dict (can be None)