Skip to main content

Optional Inputs

To use the default value for an optional input you can either set the value of the input to be None, or leave out the input entirely from your inputs dictionary:

# single invocation
variables = {
"a": 1,
"b": 2,
"optional-input": None,
}

results = arupcomputepy.MakeCalculationRequest(connection, calcId, isBatch=False, variables=variables)
# batch request
variables = {
"a": [1,2,3,4],
"b": [2,3,4,5],
"optional-input": [None,3,1], # NOTE: This list is not as long as the above two lists
}

results = arupcomputepy.MakeCalculationRequest(connection, calcId, isBatch=True, variables=variables)