{"id":44610,"library":"contrast-agent-lib","title":"Contrast Agent Library","description":"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.","status":"active","version":"0.14.0","language":"python","source_language":"en","source_url":"https://github.com/Contrast-Security-OSS/contrast-agent-lib","tags":["contrast","security","agent","api"],"install":[{"cmd":"pip install contrast-agent-lib","lang":"bash","label":"Install via pip"}],"dependencies":[],"imports":[{"wrong":"from contrast_agent_lib import ContrastAgentClient","symbol":"ContrastAgentClient","correct":"from contrast_agent_lib.lib_contrast import ContrastAgentClient"}],"quickstart":{"code":"from contrast_agent_lib import ContrastAgentClient\n\n# Replace with your actual credentials\nclient = ContrastAgentClient(api_key='YOUR_API_KEY', service_key='YOUR_SERVICE_KEY', org_uuid='YOUR_ORG_UUID')\n# Example: list agents\nagents = client.list_agents()\nprint(agents)","lang":"python","description":"Initialize the client with API key, service key, and org UUID, then call methods like list_agents()."},"warnings":[{"fix":"Use keyword arguments: ContrastAgentClient(api_key='...', service_key='...', org_uuid='...')","message":"In 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.","severity":"breaking","affected_versions":">=0.9.0"},{"fix":"Replace get_agent_by_id(agent_id) with get_agent(agent_id).","message":"The method 'get_agent_by_id(agent_id)' is deprecated as of 0.12.0. Use 'get_agent(agent_id)' instead.","severity":"deprecated","affected_versions":">=0.12.0"},{"fix":"Ensure you have valid credentials from Contrast UI. Use environment variables or a config file to store them.","message":"API 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.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"search_vec":"'0.14.0':25 'agent':2,11,17,30 'api':12,31 'client':5 'contrast':1,8,16,28 'enabl':13 'enforc':23 'interact':14 'librari':3,6 'manag':20 'month':26 'polici':22 'python':4 'releas':27 'secur':9,29 'version':24 'vulner':19","created_at":"2026-06-07T12:50:59.044022+00:00","updated_at":"2026-06-07T12:50:59.044022+00:00","problems":{"verify_error":"Traceback (most recent call last):\n  File \"<string>\", line 1, in <module>\nModuleNotFoundError: No module named 'contrast_agent_lib.lib_contrast'"},"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":null,"github":null,"docs":null,"changelog":null,"pypi":null,"npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["security"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"import_fail","verified_at":"2026-07-03","last_verified":"2026-07-03","next_check":"2026-07-10","install_tag":null}}