serverless/serverless-helpers-py

Name: serverless-helpers-py

Owner: Serverless

Description: null

Created: 2016-02-17 17:17:10.0

Updated: 2017-01-17 01:32:07.0

Pushed: 2016-03-29 17:12:50.0

Homepage: null

Size: 26

Language: Python

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

serverless_helpers

serverless test status version downloads license gitter

This library isn't required for writing Python in the serverless, but it does make your life easier by handling things like environment variables for you.

Usage
rt serverless_helpers

l .env files are loaded into the environment
is is optional if you are using serverless v0.5 or later, because it
tomatically loads variables without help
erless_helpers.load_envs(__file__)

ads stack outputs into environment variables as `SERVERLESS_CF_[output name]`
erless_helpers.load_cfn_outputs()

rt os
etenv('SERVERLESS_STAGE') # dev

t role ARN from default serverless CloudFormation stack
etenv('SERVERLESS_CF_IamRoleArnLambda') # arn:aws:iam::123456789012:....

ternate way to read roles
uts = serverless_helpers.load_cfn_outputs()
uts['IamRoleArnLambda'] # arn:aws:iam::123456789012:....
License

This code is released under the MIT software license, see LICENSE file for details. No warranty of any kind is included, and the copyright notice must be included in redistributions.

Notable exception: dotenv.py is from python-dotenv to remove dependencies on click and ordereddict for performance/deployment size reasons. Read the license contained in dotenv.py for details on its creators and license conditions.


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.