The Python implementation to access the ZAP API. For more information about ZAP consult the (main) ZAP project.
The latest released version can be downloaded from the https://pypi.python.org/pypi/zaproxy using:
pip install zaproxy
For help using the ZAP API, refer to:
- Examples - collection of examples using the library;
- API Documentation
- ZAP User Group - for asking questions;
To report issues related to ZAP API, bugs and enhancements requests, use the issue tracker of the main ZAP project.
Most of the API code is generated from the ZAP java source code.
To regenerate the API code you will need the repos zaproxy and zap-extensions checked out at the same level as this one.
You should typically generate the core API calls from the latest release tag e.g.:
cd zaproxy
git fetch upstream -t
git checkout tags/v2.13.0
./gradlew generatePythonApiEndpoints
cd ..
The add-on APIs can be generated from the zap-extensions main
branch:
cd zap-extensions
git pull upstream main
./gradle generatePythonZapApiClientFiles --continue
cd ..
The above commands will update the files in src/zapv2
.
If any new files are created then they should be manually added to src/zapv2/__init__.py
as per the existing files.
Note that you should also update the CHANGELOG.md
file to state whatever has been changed.