Skip to main content

Python SDK for Qyro assistant session + chat API

Project description

Qyro Python SDK (example)

Installation

pip install qyro-sdk

Sample Usage

from qyro_sdk.auth import ClientTokenGenerator
from qyro_sdk.client import QyroClient
from qyro_sdk.server import QyroServerClient

BASE_URL = "https://qyroai.com"
API_KEY_ID = "<>"
API_KEY_SECRET = "<>"
ASSISTANT_ID = "<>"

if __name__ == '__main__':
    server_client = QyroServerClient(
        base_url=BASE_URL,
        api_key_id=API_KEY_ID,
        api_key_secret=API_KEY_SECRET,
        timeout=120.0
    )

    session_id = server_client.create_session(ASSISTANT_ID, {"userId": "123"}).id

    output_messages = server_client.chat(assistant_id=ASSISTANT_ID, session_id=session_id, message="Hello, who are you?")
    print(output_messages)

    client_token_generator = ClientTokenGenerator(api_key_id=API_KEY_ID, api_key_secret=API_KEY_SECRET)
    client_token = client_token_generator.generate({
        "userId": "123"
    })

    client = QyroClient(base_url=BASE_URL, token=client_token)
    session_id = client.create_session(ASSISTANT_ID, {"userId": "123"}).id

    output_messages = client.chat(assistant_id=ASSISTANT_ID, session_id=session_id, message="Hello, who are you?")
    print(output_messages)

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

qyro_sdk-0.2.0.tar.gz (3.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

qyro_sdk-0.2.0-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

File details

Details for the file qyro_sdk-0.2.0.tar.gz.

File metadata

  • Download URL: qyro_sdk-0.2.0.tar.gz
  • Upload date:
  • Size: 3.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for qyro_sdk-0.2.0.tar.gz
Algorithm Hash digest
SHA256 035fcb8d0fbf18e82688696a8f2c6901ab56cc9fa048eccb5527298303642882
MD5 6343e58876664d720a8f2812cf26aff6
BLAKE2b-256 235d7ec0682593f13ba5671352ee6cad4cc561f5204dbf1df27939416170c054

See more details on using hashes here.

Provenance

The following attestation bundles were made for qyro_sdk-0.2.0.tar.gz:

Publisher: python-publish.yml on qyroai/qyro-python-sdk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file qyro_sdk-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: qyro_sdk-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 5.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for qyro_sdk-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8686b8411a36503853267540da507886d789b6c16329dc4f5ce61e26567943f0
MD5 a49cebccd9264492342eebf6c1a8da7b
BLAKE2b-256 5e6c6d4b9e39e3a6db70dfd5c9a4f0c0d32c2fa91fdeafc9f927e4c8b98d19bd

See more details on using hashes here.

Provenance

The following attestation bundles were made for qyro_sdk-0.2.0-py3-none-any.whl:

Publisher: python-publish.yml on qyroai/qyro-python-sdk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page