Python Template
There are many templates that you can choose from but for now we will focus on the Python 2.7 template. To install this template and enter into the template path enter the following into your terminal window:
serverless create --template spotinst-python --path spotinst-python-template
cd spotinst-python-template
This will create a new Python template project into a new directory spotinst-python-template. Once you are inside the project directory you will want to edit the serverless.yml file. You will need to enter in the environment ID into the environment spot. Next you will need to install the Spotinst plugin by running the install command in the project root directory:
npm install
Add External Libraries
To install dependancies for python you will need to use pip. This will install all libraries and dependancies to the project so they can be accessed by using an import statement. To do this you will need to run the command
pip install module-name -t /path/to/project-dir
Comments
0 comments
Please sign in to leave a comment.