Registry / auth-security / zaproxy

zaproxy

JSON →
library0.6.0pypypi✓ verified 87d ago

Python client for the OWASP ZAP (Zed Attack Proxy) API. Version 0.5.0 supports ZAP 2.15+. Released irregularly; maintained by the ZAP project.

pip install zaproxy
INSTALL
IMPORT
SIG · ZAPROXY
Z
zaproxy
auth-securitypythonv0.6.0
Install
2.2s avg
Import
599ms
Disk
20MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.9–3.13
musl
3.9–3.13
Install & Compatibility
Where this runs
tested against v0.6.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 0.644s · 21.8MB
glibc
py 3.10–3.95 runs
installs and imports cleanly · install 2.2s · import 0.554s · 22MB
20MB installed
● package 20MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

ZAPv2
✓ from zapv2 import ZAPv2
Official import path

Connect to local ZAP instance (must be running on port 8080) and call the core version endpoint.

from zapv2 import ZAPv2 zapi = ZAPv2(apikey=os.environ.get('ZAP_API_KEY', ''), proxy={'http': 'http://127.0.0.1:8080', 'https': 'http://127.0.0.1:8080'}) print(zapi.urlopen('http://127.0.0.1')) # Core API example print(zapi.core.version)
Debug
Known issues
breakingIn version 0.5.0, the default proxy changed. Previously the proxy was optional; now it must be explicitly passed or set to None if no proxy.
fix
Always provide the proxy argument: ZAPv2(proxy={'http': 'http://127.0.0.1:8080', 'https': '...'})
affects: 0.5.0
gotchaThe ZAP API key is required by default starting ZAP 2.9. If not set, you may get a 401 error. Pass an empty apikey if ZAP is configured without one.
fix
Set ZAP_API_KEY environment variable or pass apikey='' to ZAPv2 for unauthenticated access.
affects: >=0.3.0
Errors
Common errors & fixes
AttributeError: module 'zaproxy' has no attribute 'ZAPv2'
Importing incorrectly from top-level 'zaproxy' package instead of 'zapv2' submodule.
fix
Use 'from zapv2 import ZAPv2' instead of 'import zaproxy'.
Upgrade
Version history
0.6.0latest on PyPI · released Jun 12, 2026
Audit
Dependencies
requestsrequiredHTTP requests to ZAP API
websocket-clientrequiredWebSocket support for ZAP events
Agent activity
57 hits · last 30 days
node
48
Bingbot
1
Anthropic
1
OpenAI (training)
1
Resources
zaproxy — pip install zaproxy · libregistry