Accessing playbook variables in external script

I am doing data validation of all the variables defined in ansible using a python script. How do you access ansible variables in the external python script?