An SDK for developing Webex Assistant Skills based on the MindMeld platform.
Install the SDK
pip install webex_assistant_sdk
Using the SDK
To use the SDK we just need to import SkillApplication and pass in the RSA private key as well as the secret for verifying the request's header.
Here is an example implementation which is found in the tests folder:
from pathlib import Path
from webex_assistant_sdk.app import SkillApplication
from webex_assistant_sdk.crypto import load_private_key_from_file
secret = 'some secret'
key = load_private_key_from_file(str(Path(__file__).resolve().parent / 'id_rsa'))
app = SkillApplication(__name__, secret=secret, private_key=key)
__all__ = ['app']
Similar to MindMeld applications, for development convenience, we have included a Flask server for you to test your application.
To run the development server you can use the run command: python -m [app] run.
We do not recommend using the development server for production purpose. To learn more about productionizing Flask application, please check Deployment Options.
The introduce decorator
The SkillApplication adds a introduce decorator in addition to MindMeld's build in decorator. This is used to mark the dialogue state to use when a user calls a skill without any command, i.e. "talk to "
Example
@app.introduce
def introduction(request, responder):
pass
Debugging
To debug the server and turn off encryption/decryption, you can set the environment variable WXA_SKILL_DEBUG to be True.
Command Line
Installing the webex_assistant_sdk package adds a wxa_sdk command line application. Use the -h argument for help.
Usage: wxa_sdk [OPTIONS] COMMAND [ARGS]...
Options:
--install-completion [bash|zsh|fish|powershell|pwsh]
Install completion for the specified shell.
--show-completion [bash|zsh|fish|powershell|pwsh]
Show completion for the specified shell, to
copy it or customize the installation.
--help Show this message and exit.
Commands:
generate-keys Generate an RSA keypair
generate-secret Generate a secret token for signing requests
invoke Invoke a skill running locally or remotely
new Create a new skill project from a template
Metadata
Release files for webex-assistant-sdk 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| webex-assistant-sdk-1.0.0.tar.gz | 22.0 kB | Without provenance | Details for webex-assistant-sdk-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| webex_assistant_sdk-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for webex_assistant_sdk-1.0.0-py3-none-any.whl |
Total release size: 47.7 kB
Release files / webex-assistant-sdk-1.0.0.tar.gz
| Download URL | webex-assistant-sdk-1.0.0.tar.gz |
|---|---|
| Size | 22.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a0dd07bd9377cb28b7879857cb67ce0a1073fcc64d3a7d9e79aa232e7e4ec6e8
|
|
BLAKE2b-256 checksum How to use checksums |
ebb54252a9e01056eff96985303c6cbddb6452608629b92507433e4dbdcba345
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.8 CPython/3.7.10 Darwin/20.6.0
|
Release files / webex_assistant_sdk-1.0.0-py3-none-any.whl
| Download URL | webex_assistant_sdk-1.0.0-py3-none-any.whl |
|---|---|
| Size | 25.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a42d696eef2f1a15df4d7cf2e1774a5be6f0f219274e54bdab6779e1f1bc691d
|
|
BLAKE2b-256 checksum How to use checksums |
a8ae7bfc9152e9526ebefc3c188aa8855609b3cc56dc23211f00240cd680580a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.8 CPython/3.7.10 Darwin/20.6.0
|
Security for webex-assistant-sdk 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.