When you start the script (first time or after enabling it) it should update all the states, including the partition states (armed/disarmed, etc) via the payload in topic Paradox/AS/P1.
I suggest you leave the script running always, but disable it via MQTT (publish this topic: Paradox/C/Polling/Disable). Then when you want to check the state simply enable the code, give it some time to update the parition topics (e.g. Paradox/AS/P1) and then disable polling again.
Alternatively: If you leave the script running always, you can forcefully disconnect it remotely by sending a logout command to your alarm (e.g. smith-alarm.dyndns.org:8080/logout.html) which will disconnect the script. The /logout.html is important here… Then use your own app to control the alarm. When you disconnect the script will re-connect (it will try indefinitely).