You can initialize a script which contains the following at the start of the layout:
import math
And then you can use Python("math.pi") to retrieve the value of pi. It also works in equations like Python("math.pi") /2 so it should work for whatever you want it to.
Since pi value is constant, it would be easier to just define a global variable, call it pi and set its value to 3.1415926535897931, Python's pi value.
Why not go a step further:
3.1415926535897932384626433832795028841971693993751058......
Or you could remember it up to three or four decimals (3.1416) and reuse that, which should suffice for many calculations.
Hope that helps!