parable_web_api_sdk. It covers every operation in
the API reference. It needs Python 3.12 or later.
Install
The package is in a private Python package index. Ask your Parable representative for access. Then install the client and its types:Import and authenticate
Create a client with the base URL, your token, and your Workspace. See Authentication to get a token.Authorization: Bearer ... and the X-Tenant header on
every call.
Read
Read your membership, then the Provider connections in your Workspace:Update
Stop a Tap. This call needs a Parable token, because an MCP token only reads. Replace the ID with one from your Workspace. List Taps withsdk.tenant_connector_taps.tenant_connector_taps().
enabled: false stops the Tap.
enabled: true does not add a Tap that the connection’s enabledTaps
leaves out. To turn on an opt-in Tap, see
Turn Taps on and off.
Encrypt credentials
Two operations take an encrypted body, such assdk.connectors.add_connector_to_tenant(). Get your Workspace’s public key
and give it to the client once. The client then encrypts the body of each of
these operations:
public_encryption_key= to ClientConfig, or
options=EncryptedRequestOptions(public_encryption_key=...) to one call.
Encryption needs the cryptography package, which the encryption extra
installs: pip install "parable_web_api_sdk[encryption]". See
Encrypted request bodies.
Handle errors and retries
The client gives each request 30 seconds. Settimeout_seconds in
ClientConfig, or pass timeout_seconds= to one call, to change it.
The client retries two kinds of failure, each up to 3 times:
429. It waits for the seconds in theRetry-Afterheader, or 1, 2, and 4 seconds when the header is absent, and never more than 300 seconds. Setmax_rate_limit_retriesinClientConfigto change the count.- A network failure on
GET,HEAD, orOPTIONS. It waits 1, 2, and 4 seconds. Setmax_network_retriesto change the count. It never retries a request that can change something.
SDKError.