chai_py.deployment module¶
-
class
chai_py.deployment.
BotStatus
(**kwargs)¶ Bases:
dict
-
activeDeployment
: Optional[chai_py.deployment.Deployment]¶
-
failedDeployment
: Optional[chai_py.deployment.Deployment]¶
-
status
: str¶
-
timestamp
: int¶
-
-
chai_py.deployment.
advertise_deployed_bot
(bot_uid: str) → str¶ Displays the url, a QR code, along with additional guidance.
- Parameters
bot_uid –
- Returns
The url for the bot.
-
chai_py.deployment.
delete_bot
(bot_uid: str) → str¶ Uses an HTTPS request to trigger deletion of bot with specified UID.
- Parameters
bot_uid –
- Returns
The url for the bot.
-
chai_py.deployment.
get_bot_status
(bot_uid: str) → chai_py.deployment.BotStatus¶ Gets the status of the bot.
- Parameters
bot_uid –
- Returns
-
chai_py.deployment.
parse_signed_url_for_bot_uid
(url: str)¶ Parses a bot UID from a signed URL.
- Assumes the signed URL follows the following scheme:
[…]/{bot_uid}.zip?[…]
- Parameters
url –
- Returns
Displays the url, a QR code, along with additional guidance.
- Parameters
bot_uid –
- Returns
The url for the bot.
-
chai_py.deployment.
upload_and_deploy
(package: AnyStr, bot_uid: Optional[str] = None) → str¶ Uploads the given archive, triggering deployment of the chatbot.
- Parameters
package – Path to the packaged chatbot zip.
bot_uid – Used to modify an existing bot: the UID of the previously-deployed bot.
- Return bot_uid
The UID of the deployed bot.
-
chai_py.deployment.
wait_for_deployment
(bot_uid: str, sleep: float = 3)¶ Waits for deployment of the bot to complete.
- Parameters
bot_uid –
sleep – Polling interval in seconds.
- Returns