harness-python-sdk is the official Python SDK for programmatic interaction with Harness services. It provides a convenient client to automate tasks, manage resources, and integrate Harness functionality into other applications. The current version is 1.0.5, and it appears to have an infrequent release cadence, focusing on stability.
pip install harness-python-sdkVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to initialize the `HarnessClient` using API key and account ID, preferably loaded from environment variables for security. It then attempts to access a sub-service (PlatformService) to verify connection, catching potential initialization or API errors.
Use environment variables (`os.environ.get`), a secrets management system (e.g., Vault, AWS Secrets Manager), or a configuration file that is not committed to version control.
Ensure you import from the correct submodule, e.g., `from harness_python_sdk.client import HarnessClient` and `from harness_python_sdk.services.platform import PlatformService`.
Wrap your API calls in `try...except harness_python_sdk.exceptions.APIError as e:` blocks to gracefully handle and inspect API-returned error messages and codes.
No dependency data recorded yet.