JSON Input 🗄️
Refer to the JSON page in the Explanation section of the documentation to understand what JSON is and why/when it needs to be used with ArupCompute.
Example
arupcomputepy
neatly handles the conversion to JSON in the background, with a user simply creating a mirrored data structure in python using dictionaries (cf. JSON key-value pairs) and lists (cf. JSON arrays).
import arupcomputepy
# set up our connection ArupCompute
jobNumber = '00000000' # for testing only - please use a real job number
connection = arupcomputepy.Connection(jobNumber)
calcID = 4239475 # SectionProperties > Calculate > AutoProp v1.1.7 https://compute.arup.digital/calcs/4239475
variables = {
'y_coords': [0,0,100,100,0],
'z_coords': [0,100,100,0,0]
}
response = arupcomputepy.MakeCalculationRequest(connection, calcID, isBatch=False, variables=variables)
print(response.availableResults())
print(response['A'])