Skip to main content

Turbine Python SDK

Minimal, sync-first Python client for the Turbine GraphQL API.

Getting started

Install from PyPI (pip, poetry add, or uv add):

pip install netrise-turbine-sdk

Create a .env file in your project directory — TurbineClientConfig.from_env() loads it automatically (current directory, then parents):

endpoint=https://apollo.turbine.netrise.io/graphql/v3
audience=https://prod.turbine.netrise.io/
domain=https://authn.turbine.netrise.io
client_id=<client_id>
client_secret=<client_secret>
organization_id=<org_id>

Prefer plain environment variables or your own dotenv loading? Set the same names in the environment and call TurbineClientConfig.from_env(load_env_file=False).

Need credentials? Contact support@netrise.io.

Want the full experience? uv tool install netrise-turbine-cli adds the turbine CLI (SDK included), and turbine skill install adds the agent skill to Cursor, Claude Code, Codex, and opencode.

Versioning and stability

  • netrise_turbine_sdk (the wrapper) is semver-stable: existing imports, method names, and call signatures do not break without an intentional minor/major bump.
  • netrise_turbine_sdk_graphql (generated) tracks the Turbine GraphQL schema. Fully typed, power-user surface; schema refreshes are guarded by API-surface snapshot tests and a schema-diff gate.

See CHANGELOG.md for release notes.

Union field aliasing

When GraphQL union members declare same-named fields with different types, the generator aliases them as {camelCaseTypeName}{PascalCaseFieldName} so each gets its own Python type. Example — both NotificationControl members define events:

for pref in client.query_notification_settings().preferences:
    for control in pref.controls:
        if hasattr(control, "assetAnalysisControlEvents"):
            events = control.assetAnalysisControlEvents
        elif hasattr(control, "userManagementControlEvents"):
            events = control.userManagementControlEvents

Reducing response size (Lite / Summary)

Full query_* / iter_* methods request every field the server exposes. The trimmed counterparts typically cut response bytes 70–80%:

Full Lite Summary
iter_assets_relay iter_assets_relay_lite iter_assets_relay_summary
iter_vulnerabilities iter_vulnerabilities_lite —
iter_dependencies iter_dependencies_lite —
iter_misconfigurations iter_misconfigurations_lite —
iter_detailed_vulnerabilities iter_detailed_vulnerabilities_lite —
query_vulnerability query_vulnerability_lite —

Rule of thumb: Full for audit/export, Lite for tables and CSVs (identifiers, severity, CVSS/EPSS, rollup counts), Summary for org-wide sweeps (id, name, analytic counts only). Sweep with Summary, then drill in only where counts are non-zero:

from netrise_turbine_sdk import TurbineClient, TurbineClientConfig

sdk = TurbineClient(TurbineClientConfig.from_env())

for asset in sdk.iter_assets_relay_summary(page_size=100):
    counts = asset.analytic
    if counts.vulnerability.critical + counts.vulnerability.high > 0:
        for vuln in sdk.iter_vulnerabilities_lite(asset_id=asset.id):
            print(asset.name, vuln.cve, vuln.severity, vuln.cvss_score)

File listing

list_files returns the complete recursive file listing for an asset in one call:

files = sdk.list_files("your-asset-id")
for f in files:
    print(f["filesystemPath"], f.get("size"), f.get("mimeType"))

Entries are dicts with keys like path, filesystemPath, size, mimeType, hashSha256, permissions, and hasChildren.

Documentation

API documentation and code samples — quick start, filtering cookbook, error handling, and per-operation pages.

License

See LICENSE.

Metadata

Release files for netrise-turbine-sdk 0.1.23

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for netrise-turbine-sdk 0.1.23
File Size Uploaded Provenance Actions
netrise_turbine_sdk-0.1.23.tar.gz 127.6 kB Without provenance Details for netrise_turbine_sdk-0.1.23.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for netrise-turbine-sdk 0.1.23
File Interpreter ABI Platform Actions
netrise_turbine_sdk-0.1.23-py3-none-any.whl Python 3 none any Details for netrise_turbine_sdk-0.1.23-py3-none-any.whl

Total release size: 331.1 kB

Release files / netrise_turbine_sdk-0.1.23.tar.gz

Download URL netrise_turbine_sdk-0.1.23.tar.gz
Size 127.6 kB
Tags Source
SHA-256 checksum
How to use checksums
ad73baa10c28cf2faf2df0661ad26dc20ceef89aec340057fa816ecc3999cb9b
BLAKE2b-256 checksum
How to use checksums
2bb59dea8647b6378efbca53553d4a947703811accfa3d448cd57b11d0afb0f5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.12

Release files / netrise_turbine_sdk-0.1.23-py3-none-any.whl

Download URL netrise_turbine_sdk-0.1.23-py3-none-any.whl
Size 203.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
46a1237d402fe75146e2e8c1ac5384eee1f41e8154fd6ae92c0f93a15216251b
BLAKE2b-256 checksum
How to use checksums
25a47dfb8fb896b5cfe0bd02a7ae9f0bfb2ee4b206f4353ff709eb51d3df002b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.12

Security for netrise-turbine-sdk 0.1.23

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page