Official Python SDK for the Relancify API.
Project description
Relancify SDK (Python)
Official Python SDK for the Relancify API.
Installation
pip install relancify-sdk
Quickstart
from relancify_sdk import RelancifyClient
client = RelancifyClient(
base_url="https://api.relancify.com/api/v1",
api_key="<your_api_key>",
)
agents = client.agents.list()
print(len(agents))
client.close()
Available resources
client.agentsclient.operationsclient.runtimeclient.usersclient.voicesclient.api_keys
Notes
- The SDK uses synchronous
httpx. - HTTP errors are raised as
relancify_sdk.errors.ApiError. - Runtime websocket connections can use short-lived connect tokens via
client.runtime.create_connect_token(...). - Publish flow: create/update agent locally, call
client.agents.publish(agent_id), then pollclient.operations.get(operation_id). - Agent IDs use the public format
ag_<uuid>for all agent endpoints. ApiErrorexposescode,scope,limit,current, andretry_after_sechelpers for rate-limit handling.
Runtime backpressure handling (recommended)
Use bounded retry when create_runtime_session returns 429 or code starting with rate_limit_.
import random
import time
from relancify_sdk import ApiError
MAX_ATTEMPTS = 3
def create_runtime_session_with_retry(client, agent_id: str):
for attempt in range(1, MAX_ATTEMPTS + 1):
try:
return client.agents.create_runtime_session(agent_id)
except ApiError as exc:
is_rate_limited = exc.status_code == 429 or str(exc.code or "").startswith("rate_limit_")
if not is_rate_limited or attempt >= MAX_ATTEMPTS:
raise
retry_after = exc.retry_after_sec or 1
time.sleep(retry_after + random.uniform(0, 0.25))
raise RuntimeError("Unable to create runtime session after retry")
Security best practices
- Never hardcode API keys or bearer tokens in source code.
- Use environment variables or a secure secret manager.
- Rotate credentials periodically.
- Prefer short-lived access tokens when possible.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file relancify_sdk-0.4.1.tar.gz.
File metadata
- Download URL: relancify_sdk-0.4.1.tar.gz
- Upload date:
- Size: 6.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
35cb846b14de68c226516fe26d2e7546f5f5efb5201f00ce41aca36ee511fd95
|
|
| MD5 |
6333cd63949747c03b9a536b4b51a81e
|
|
| BLAKE2b-256 |
5f446864991b5d10d756635181ff5a65c5fb9c73fab3144bfa6eaf666ecc049c
|
Provenance
The following attestation bundles were made for relancify_sdk-0.4.1.tar.gz:
Publisher:
publish-sdk-pypi.yml on NKSTUD/relancify-sdk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
relancify_sdk-0.4.1.tar.gz -
Subject digest:
35cb846b14de68c226516fe26d2e7546f5f5efb5201f00ce41aca36ee511fd95 - Sigstore transparency entry: 996321994
- Sigstore integration time:
-
Permalink:
NKSTUD/relancify-sdk@6d01db26e58eb08e2c53ef91795d58c0b1c18ca9 -
Branch / Tag:
refs/tags/sdk-v0.4.1 - Owner: https://github.com/NKSTUD
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-sdk-pypi.yml@6d01db26e58eb08e2c53ef91795d58c0b1c18ca9 -
Trigger Event:
push
-
Statement type:
File details
Details for the file relancify_sdk-0.4.1-py3-none-any.whl.
File metadata
- Download URL: relancify_sdk-0.4.1-py3-none-any.whl
- Upload date:
- Size: 8.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4f55d4c58c76ef23f8a657eb8f13cdbceb2c7fdd0f69774638be79b697e48ddf
|
|
| MD5 |
6247336c66127978226fe89fdfb3c943
|
|
| BLAKE2b-256 |
5db2a86df027afbad5bb3ffca5907c9ef9f2de9fcceb64d4fc6efeb5592b7927
|
Provenance
The following attestation bundles were made for relancify_sdk-0.4.1-py3-none-any.whl:
Publisher:
publish-sdk-pypi.yml on NKSTUD/relancify-sdk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
relancify_sdk-0.4.1-py3-none-any.whl -
Subject digest:
4f55d4c58c76ef23f8a657eb8f13cdbceb2c7fdd0f69774638be79b697e48ddf - Sigstore transparency entry: 996321999
- Sigstore integration time:
-
Permalink:
NKSTUD/relancify-sdk@6d01db26e58eb08e2c53ef91795d58c0b1c18ca9 -
Branch / Tag:
refs/tags/sdk-v0.4.1 - Owner: https://github.com/NKSTUD
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-sdk-pypi.yml@6d01db26e58eb08e2c53ef91795d58c0b1c18ca9 -
Trigger Event:
push
-
Statement type: