A library to help create apps for the voice assistant Snips
Project description
SnipsKit is a Python library with some helper tools to work with the voice assistant Snips. This can be used by Snips apps or other programs that work with Snips.
With SnipsKit, you can create Snips apps without having to write much boilerplate code. The simplest example of an app using SnipsKit is the following:
from snipskit.hermes.apps import HermesSnipsApp
from snipskit.hermes.decorators import intent
class SimpleSnipsApp(HermesSnipsApp):
@intent('User:ExampleIntent')
def example_intent(self, hermes, intent_message):
hermes.publish_end_session(intent_message.session_id,
"I received ExampleIntent")
if __name__ == "__main__":
SimpleSnipsApp()
And that’s it! No need to connect to an MQTT broker, no need to register callbacks, because the HermesSnipsApp class:
reads the MQTT connection settings from the snips.toml file;
connects to the MQTT broker;
registers the method with the intent decorator as a callback method for the intent ‘User:ExampleIntent’;
starts the event loop.
SnipsKit also has decorators for other events, and there’s also a class MQTTSnipsApp to listen to MQTT topics directly. Moreover, SnipsKit also gives the app easy access to:
the Snips configuration;
the Hermes or MQTT connection object;
the assistant’s configuration;
the app’s configuration.
System requirements
SnipsKit is a Python 3-only library, requiring Python 3.5 or higher. It’s currently tested on Python 3.5, 3.6 and 3.7.
Installation
SnipsKit is packaged on PyPI. The latest stable version with all functionality can be installed with the following command:
pip install snipskit[hermes,mqtt]
Documentation
The full documentation can be found on Read the Docs, for both the stable version and the development version.
Copyright
This library is provided by Koen Vervloesem as open source software. See LICENSE for more information.
Project details
Release history Release notifications | RSS feed
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
File details
Details for the file snipskit-0.5.0.tar.gz
.
File metadata
- Download URL: snipskit-0.5.0.tar.gz
- Upload date:
- Size: 11.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 91436d10560f94a2dc4a10b634522f5f8eceea18a9dd37bec41e29fe3b35ef3e |
|
MD5 | c1e8f9a185dbd227a82742f2176b22ef |
|
BLAKE2b-256 | 602b272bc706126c873b48a1f5384f8100a16b945d21d2cb94a5a9f8e5c959ab |
File details
Details for the file snipskit-0.5.0-py3-none-any.whl
.
File metadata
- Download URL: snipskit-0.5.0-py3-none-any.whl
- Upload date:
- Size: 20.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 033c686e00b7a1efbf86b19a4e2dcf814e0c463ac8721588ee6009fa160ad9fb |
|
MD5 | 6e5ed908d765ead70bd1f89ee4c51cca |
|
BLAKE2b-256 | bf27405bf47d302ba4235c1091a1469ad70eef535e54092a0070e52ab26b181e |