{"id":22347,"library":"secops","title":"SecOps SDK","description":"Python SDK for wrapping the Google SecOps API for common use cases. Version 0.43.0, MIT license, pre-1.0 rapid development with frequent breaking changes.","status":"active","version":"0.43.0","language":"python","source_language":"en","source_url":"https://github.com/google/secops-wrapper.git","tags":["secops","google","sdk","security"],"install":[{"cmd":"pip install secops","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"Required for authentication via service account or ADC","package":"google-auth","optional":false}],"imports":[{"note":"Client is exposed at package level since 0.40.0","wrong":"from secops.client import SecOpsClient","symbol":"SecOpsClient","correct":"from secops import SecOpsClient"}],"quickstart":{"code":"from secops import SecOpsClient\nimport os\n\nclient = SecOpsClient(service_account_json=os.environ.get('SERVICE_ACCOUNT_JSON', ''))\n# Perform a search\nresults = client.search('SELECT * FROM events LIMIT 10')\nprint(results)","lang":"python","description":"Create a client using service account JSON from environment variable, then run a basic search."},"warnings":[{"fix":"Use list(results) if you need a list, or iterate directly.","message":"The search() method now returns a generator instead of a list. Iterate or use list() explicitly.","severity":"breaking","affected_versions":">=0.40.0"},{"fix":"Read the file contents with open().read() before passing.","message":"Service account JSON must be the full key content, not a file path. Using a path will fail silently.","severity":"gotcha","affected_versions":"all"},{"fix":"Replace client.query(...) with client.search(...).","message":"The 'query' parameter in client.query() is deprecated. Use search() instead.","severity":"deprecated","affected_versions":">=0.42.0"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Set SERVICE_ACCOUNT_JSON environment variable or run `gcloud auth application-default login`.","cause":"No service account JSON or ADC environment configured.","error":"google.auth.exceptions.DefaultCredentialsError: Could not automatically determine credentials."},{"fix":"Use client.search() instead of client.query().","cause":"The query() method was removed in 0.42.0.","error":"AttributeError: 'SecOpsClient' object has no attribute 'query'"},{"fix":"Wrap call in list(): results = list(client.search(...))","cause":"search() returns a generator, not a list.","error":"TypeError: 'generator' object is not subscriptable"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}