Installation¶
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.
SnipsKit requires the following Python packages if you want to use the complete functionality:
hermes-python>=0.3.3
paho-mqtt
toml
If your platform supports these packages, SnipsKit should also be supported.
Install SnipsKit¶
SnipsKit is packaged on PyPI. The latest stable version with all functionality can be installed with the following command:
pip install snipskit[hermes,mqtt]
This will also install its dependencies:
hermes-python>=0.3.3
paho-mqtt
toml
However, in many projects you don’t need the complete functionality. Then you have the following options to prevent pulling in unnecessary dependencies:
The hermes module¶
If you don’t need the snipskit.mqtt
module because you’re using the snipskit.hermes
module, install the SnipsKit library like this:
pip install snipskit[hermes]
This will install the complete library and the following dependencies:
hermes-python>=0.3.3
toml
The mqtt module¶
If you don’t need the snipskit.hermes
module because you’re using the snipskit.mqtt
module, install the SnipsKit library like this:
pip install snipskit[mqtt]
This will install the complete library and the following dependencies:
paho-mqtt
toml
Only the basic modules¶
If you only need the basic modules because you don’t need the snipskit.hermes
and snipskit.mqtt
modules, install the SnipsKit library like this:
pip install snipskit
This will install the complete library and the following dependencies:
toml
Virtual environments¶
It is recommended to use a virtual environment and activate it before installing SnipsKit in order to manage your project dependencies properly. You can create a virtual environment with the name venv in the current directory and activate it like this:
python3 -m venv venv
source venv/bin/activate
After this, you can install SnipsKit in the virtual environment.