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
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
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.
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:....
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.