Registry / gcp / secops

secops

JSON →
library0.44.1pypypi✓ verified 85d ago

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.

pip install secops
INSTALL
IMPORT
SIG · SECOPS
S
secops
gcppythonv0.44.1
Install
5.5s avg
Import
1235ms
Disk
147MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.44.1 · 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.103.95 runs
installs and imports cleanly · install 0.0s · import 1.284s · 147.5MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 5.5s · import 1.186s · 148MB
147MB installed
● package 147MB
Code
Verified usage

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

SecOpsClient
from secops import SecOpsClient
from secops.client import SecOpsClient
Client is exposed at package level since 0.40.0

Create a client using service account JSON from environment variable, then run a basic search.

from secops import SecOpsClient import os client = SecOpsClient(service_account_json=os.environ.get('SERVICE_ACCOUNT_JSON', '')) # Perform a search results = client.search('SELECT * FROM events LIMIT 10') print(results)
Debug
Known issues
breakingThe search() method now returns a generator instead of a list. Iterate or use list() explicitly.
fix
Use list(results) if you need a list, or iterate directly.
affects: >=0.40.0
gotchaService account JSON must be the full key content, not a file path. Using a path will fail silently.
fix
Read the file contents with open().read() before passing.
affects: all
deprecatedThe 'query' parameter in client.query() is deprecated. Use search() instead.
fix
Replace client.query(...) with client.search(...).
affects: >=0.42.0
Errors
Common errors & fixes
google.auth.exceptions.DefaultCredentialsError: Could not automatically determine credentials.
No service account JSON or ADC environment configured.
fix
Set SERVICE_ACCOUNT_JSON environment variable or run `gcloud auth application-default login`.
AttributeError: 'SecOpsClient' object has no attribute 'query'
The query() method was removed in 0.42.0.
fix
Use client.search() instead of client.query().
TypeError: 'generator' object is not subscriptable
search() returns a generator, not a list.
fix
Wrap call in list(): results = list(client.search(...))
Upgrade
Version history
0.44.1latest on PyPI · released May 22, 2026
Audit
Dependencies
google-authrequiredRequired for authentication via service account or ADC
Agent activity
24 hits · last 30 days
node
20
OpenAI (training)
1
Resources
secops — pip install secops · libregistry