Registry / security / coze-workload-identity

coze-workload-identity

JSON →
library0.1.13pypypi✓ verified 82d ago

Python SDK for Coze workload identity authentication. Version 0.1.13 is current. Enables non-interactive authentication using workload identities (e.g., service account keys) for Coze API access. Rapid release cadence.

pip install coze-workload-identity
INSTALL
IMPORT
SIG · COZE-WORKLOAD-IDEN
C
coze-workload-identity
securitypythonv0.1.13
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

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

WorkloadIdentity
from coze_workload_identity import WorkloadIdentityError
from coze_workload_identity import WorkloadIdentity
Client
from coze_workload_identity import Client
load_skill_env
from coze_workload_identity import load_skill_env

Simple authentication using environment variables.

import os from coze_workload_identity import WorkloadIdentity, WorkloadIdentityAuth # Use environment variables for credentials client_id = os.environ.get('COZE_CLIENT_ID', '') client_secret = os.environ.get('COZE_CLIENT_SECRET', '') # Create identity identity = WorkloadIdentity(client_id=client_id, client_secret=client_secret) # Authenticate auth = WorkloadIdentityAuth(identity) token = auth.get_token() print(f'Access token: {token}')
Debug
Known issues
breakingVersion 0.1.x is pre-1.0. API may change without notice. Use with caution for production.
fix
Pin exact version and test upgrades.
affects: all < 1.0.0
gotchaEnvironment variables COZE_CLIENT_ID and COZE_CLIENT_SECRET are not always documented. They must be set explicitly or passed as arguments.
fix
Always set credentials via arguments or ensure env vars are present.
affects: all
gotchaThe get_token() method may return different token types depending on the identity provider. Relying on token format can cause issues.
fix
Treat token as opaque string; don't parse its contents.
affects: all
deprecatedSome older examples use 'WorkloadIdentityAuth' incorrectly. Always call get_token() after construction.
fix
Use pattern: auth = WorkloadIdentityAuth(identity); token = auth.get_token()
affects: 0.1.0 - 0.1.10
Upgrade
Version history
0.1.13latest on PyPI · released Apr 29, 2026
Audit
Dependencies

No dependency data recorded yet.

Agent activity
47 hits · last 30 days
node
44
OpenAI (training)
1
Resources

No resource links recorded.

coze-workload-identity — pip install coze-workload-identity · libregistry