Lambada Reference API Documentation¶
Lambada package entry point
-
class
lambada.Dancer(function, name=None, description=u'', **kwargs)[source]¶ Bases:
objectSimple function wrapping class to add context to the function (i.e. name, description, memory.)
Creates a dancer object to let us know something has been decorated and store the function as the callable.
Parameters: - function (callable) – Function to wrap.
- name (str) – Name of function.
- description (str) – Description of function.
- kwargs – See
OPTIONAL_CONFIGfor options, if not specified in dancer, the Lambada objects configuration is used, and if that is unspecified, the defaults listed there are used.
-
config¶ A dictionary of configuration variables that can be merged in with the Lambada object
-
class
lambada.Lambada(handler=u'lambda.tune', **kwargs)[source]¶ Bases:
objectLambada class for managing, discovery and calling the correct lambda dancers.
Setup the data structure of dancers and do some auto configuration for us with deploying to AWS using
lambda_uploader. SeeOPTIONAL_CONFIGfor arguments and defaults.-
dancer(name=None, description=u'', **kwargs)[source]¶ Wrapper that adds a given function to the dancers dictionary to be called.
Parameters: - name (str) – Optional lambda function name (default uses the name of the function decorated.
- description (str) – Description field in AWS of the function.
- kwargs – Key/Value overrides of either defaults or Lambada class
configuration values. See
OPTIONAL_CONFIGfor available options.
Returns: - Object with configuration and callable that is the function
being wrapped
Return type:
-
Modules¶
lambada.cli module¶
Command line interface for running, packaging, and uploading commands to AWS.
lambada.common module¶
Common classes, functions, etc.
-
class
lambada.common.LambadaConfig(path, config)[source]¶ Bases:
lambda_uploader.config.ConfigSmall override to load config from dictionary instead of from a configuration file.
Takes config dictionary directly instead of retrieving it from a configuration file.
-
class
lambada.common.LambdaContext(function_name, function_version=None, invoked_function_arn=None, memory_limit_in_mb=None, aws_request_id=None, log_group_name=None, log_stream_name=None, identity=None, client_context=None, timeout=None)[source]¶ Bases:
objectConvenient class duplication of the one passed in by Amazon as defined at:
http://docs.aws.amazon.com/lambda/latest/dg/python-context-object.html
Setup all the attributes of the class.