A companion package to IBM Watson IoT Platform Analytics containing sample functions and base classes from which to derive custom functions.
These instructions will get you up and running in your local environment or in Watson Studio for development and testing purposes.
- python 3.X (https://www.anaconda.com/distribution/)
- future (pip install future)
- pandas (pip install pandas)
- sqlalchemy (pip install sqlalchemy)
- ibm_db_sa (pip install ibm_db_sa)
- ibm_cos_sdk (pip install ibm-cos-sdk)
- lxml (pip install lxml)
Caveat
- Shipping to pypi or test-pypi requires a token
- Version numbers can never be reused.
- Build a distribution first
python3 setup.py sdist bdist_wheel
- Upload to test-pypi
twine upload --verbose --repository testpypi dist/*
- When everything appears to be okay upload to pypi
twine upload --verbose --repository pypi dist/*
- Create a virtual environment
python3 -m venv env
- Activate virtual environment
source env/bin/activate
- Install in your local environment from GitHub
Replace 'XXX' by the version of your IBM Watson IoT Platform Analytics installation like, for example, '8.10.x' or '8.11.x'
pip install git+git://github.com/ibm-watson-iot/functions@XXX --upgrade
To install in IBM Watson Studio from another Jupyter notebook:
!pip install git+git://github.com/ibm-watson-iot/functions.git@XXX --upgrade
Replace 'XXX' by the version of your IBM Watson IoT Platform Analytics installation like, for example, '8.10.x' or '8.11.x'
Test for successful install:
import iotfunctions as fn
print(fn.__version__)
Keep up to date with the latest changes.