Install & Compatibility
Where this runs
tested against v2.0.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
muslpy 3.10–3.920 runs
installs and imports cleanly · install 0.0s · import 0.623s · 21.3MB
glibcpy 3.10–3.920 runs
installs and imports cleanly · install 2.1s · import 0.541s · 22MB
19MB installed
● package 19MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
SecretServer
✓ from delinea.secrets.server import SecretServer
✗ from thycotic.secrets.server import SecretServer
The top-level namespace changed from 'thycotic' to 'delinea' in version 1.2.0 due to rebranding.
SecretServerCloud
✓ from delinea.secrets.server import SecretServerCloud
PasswordGrantAuthorizer
✓ from delinea.secrets.server import PasswordGrantAuthorizer
SecretServerError
✓ from delinea.secrets.server import SecretServerError
This quickstart demonstrates how to authenticate with Delinea Secret Server Cloud using a username and password and then retrieve a secret by its ID. It relies on environment variables for sensitive credentials.
import os
from delinea.secrets.server import (
SecretServerCloud,
PasswordGrantAuthorizer,
SecretServerError
)
# Ensure these environment variables are set:
# TSS_TENANT (e.g., 'mytenant')
# TSS_USERNAME
# TSS_PASSWORD
try:
tenant = os.environ.get('TSS_TENANT', '')
username = os.environ.get('TSS_USERNAME', '')
password = os.environ.get('TSS_PASSWORD', '')
if not all([tenant, username, password]):
raise ValueError("TSS_TENANT, TSS_USERNAME, and TSS_PASSWORD environment variables must be set.")
# For Secret Server Cloud, 'tenant' parameter simplifies URL construction
authorizer = PasswordGrantAuthorizer(
base_url=f"https://{tenant}.secretservercloud.com",
username=username,
password=password
)
secret_server_cloud = SecretServerCloud(tenant=tenant, authorizer=authorizer)
# Example: Fetch a secret by ID
secret_id = 123 # Replace with a valid secret ID from your Secret Server
secret = secret_server_cloud.get_secret(secret_id)
print(f"Successfully fetched secret with ID {secret_id}:")
print(f"Secret Name: {secret.name}")
# Access secret fields, e.g., secret.data['username'] or secret.data['password']
except SecretServerError as e:
print(f"Secret Server Error: {e.message}")
print("Please check your credentials, tenant URL, and permissions.")
except ValueError as e:
print(f"Configuration Error: {e}")
except Exception as e:
print(f"An unexpected error occurred: {e}")
Errors
Common errors & fixes
ImportError: No module named 'thycotic'
Attempting to import classes using the old `thycotic` namespace after upgrading the SDK to version 1.2.0 or higher.
fixChange import statements from `from thycotic.secrets.server import ...` to `from delinea.secrets.server import ...`.
Secret Server Error: Access Denied
The authenticated user or application account lacks the necessary permissions to access the requested secret or perform the action.
fixVerify the permissions assigned to the user or application account in Delinea Secret Server. Ensure the account has 'Read' permissions on the specific secret or folder.
requests.exceptions.SSLError: HTTPSConnectionPool(...) Max retries exceeded with url: /oauth2/token (Caused by SSLError(CertificateError("hostname 'yourserver.com' doesn't match ...")))
The Python `requests` library cannot verify the SSL certificate presented by the Secret Server instance, often due to self-signed or untrusted certificates.
fixEither install a trusted certificate on the Secret Server or configure the client environment to trust the certificate (e.g., by setting `REQUESTS_CA_BUNDLE` to a .pem file containing the certificate chain).
Secret Server Error: The remote server returned an error: (400) Bad Request
Often caused by incorrect authentication credentials (username, password, or tenant/base URL), or webservices not being enabled on the Secret Server instance.
fixDouble-check your `TSS_USERNAME`, `TSS_PASSWORD`, `TSS_TENANT` (or `base_url`) environment variables. Confirm that 'Enable Webservices' is set to 'Yes' in your Secret Server configuration.
Upgrade
Version history
2.0.1latest on PyPI · released Nov 3, 2025
Audit
Dependencies
No dependency data recorded yet.