Registry / security / contrast-agent-lib

contrast-agent-lib

JSON →
library0.14.0pypypiunverified

Python client library for Contrast Security's agent API, enabling interaction with Contrast agents for vulnerability management and policy enforcement. Version 0.14.0, monthly releases.

pip install contrast-agent-lib
INSTALL
IMPORT
SIG · CONTRAST-AGENT-LIB
C
contrast-agent-lib
securitypythonv0.14.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

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

ContrastAgentClient
from contrast_agent_lib.lib_contrast import ContrastAgentClient
from contrast_agent_lib import ContrastAgentClient

Initialize the client with API key, service key, and org UUID, then call methods like list_agents().

from contrast_agent_lib import ContrastAgentClient # Replace with your actual credentials client = ContrastAgentClient(api_key='YOUR_API_KEY', service_key='YOUR_SERVICE_KEY', org_uuid='YOUR_ORG_UUID') # Example: list agents agents = client.list_agents() print(agents)
Debug
Known issues
breakingIn version 0.9.0, the constructor signature changed: old positional args 'api_key', 'service_key', 'org_uuid' now require keyword arguments. Passing them positionally will raise TypeError.
fix
Use keyword arguments: ContrastAgentClient(api_key='...', service_key='...', org_uuid='...')
affects: >=0.9.0
deprecatedThe method 'get_agent_by_id(agent_id)' is deprecated as of 0.12.0. Use 'get_agent(agent_id)' instead.
fix
Replace get_agent_by_id(agent_id) with get_agent(agent_id).
affects: >=0.12.0
gotchaAPI key, service key, and org UUID are required. If any are missing or invalid, the client will raise an AuthenticationError. The library does not validate these until the first API call.
fix
Ensure you have valid credentials from Contrast UI. Use environment variables or a config file to store them.
affects: all
Upgrade
Version history
0.14.0latest on PyPI · released Apr 29, 2026
Audit
Dependencies

No dependency data recorded yet.

Agent activity
20 hits · last 30 days
node
18
Amazon
1
Resources

No resource links recorded.

contrast-agent-lib — pip install contrast-agent-lib · libregistry