Skip to main content

A library to help create apps for the voice assistant Snips

Project description

Build status Maintainability Test coverage Code quality Documentation status PyPI package version Supported Python versions License

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.apps import HermesSnipsApp
from snipskit.decorators.hermes 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 and Python 3.6.

Installation

SnipsKit is packaged on PyPI, so the latest stable version can be installed with the following command:

pip install snipskit

Documentation

The full documentation can be found on Read the Docs, for both the stable version and the development version.

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

snipskit-0.3.0.tar.gz (10.4 kB view details)

Uploaded Source

Built Distribution

snipskit-0.3.0-py3-none-any.whl (12.7 kB view details)

Uploaded Python 3

File details

Details for the file snipskit-0.3.0.tar.gz.

File metadata

  • Download URL: snipskit-0.3.0.tar.gz
  • Upload date:
  • Size: 10.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

Hashes for snipskit-0.3.0.tar.gz
Algorithm Hash digest
SHA256 239a95d9cfd4ae53bc9252eed7a24962a338e69d8fb7c0da22bc7a856c5d01e5
MD5 fc70f8e750bdd1ce3faeaa9364e977b7
BLAKE2b-256 92ac36c49dc9faafe672ca98b97f4b448ba70742f3c6fb07903b04540196c0ed

See more details on using hashes here.

File details

Details for the file snipskit-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: snipskit-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 12.7 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

Hashes for snipskit-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a71c6b7a4b42de35ed8107d48e2cd045043ba826ef16b27b3f5e041cf22c2c49
MD5 52b477c7794d198c3fe495aee03d81c6
BLAKE2b-256 6205dd2e384c5ebe27426952971ec9135c75c7332f6c80a5580fbc8d55c03ac8

See more details on using hashes here.

Supported by

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