Interacting with OWASP ZAP using Python
The ZAP Python API can be installed using the pip install
command and by specifying the OWASP ZAP version, as explained here: https://github.com/zaproxy/zap-api-python.
$ pip install python-owasp-zap-v2.4
Once the ZAP Python package is installed, you can import it with the following import:
>>> from zapv2 import ZAPv2
>>> zap=ZAPv2()
>>> dir(zap)
['_ZAPv2__apikey', '_ZAPv2__proxies', '_ZAPv2__validate_status_code', '__class__', '__delattr__', '__dict__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__gt__', '__hash__', '__init__', '__init_subclass__', '__le__', '__lt__', '__module__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__...