Using third party packages

You can use third party packages within each programming language.


Create the following script with the file name

import pytz

def main(params):
    return {'version': pytz.__version__}

Create a virtualenv as follows:

docker run --rm -v "$PWD:/tmp" openwhisk/python3action bash   -c "cd tmp && virtualenv virtualenv && source virtualenv/bin/activate && pip install -r requirements.txt"

Create a zip file containing the virtualenv directory and

zip -r virtualenv

Upload the zip file and create a function.

meteoroid function create function1 -l python:3 --main main