This package contains type stubs to provide more precise static types and type inference for AWS Lambda Python Runtime Interface(awslambdaric).
awslambdaric
uses dynamic Python features that makes having precise types for
some code patterns problematic. The final goal is to be able to get precise
types for most common patterns. Currently, LambdaContext
class is supported. A
simple example:
from awslambdaric.lambda_context import LambdaContext
def lambda_handler(event: dict, context: LambdaContext):
message = 'Hello {} {}!'.format(event['first_name'], event['last_name'])
return {
'request_id': context.aws_request_id,
'message' : message,
}
Install latest published version as:
$ pip install -U awslambdaric-stubs
To install the development version of the package:
$ git clone https://github.com/toidi/awslambdaric-stubs.git
$ cd awslambdaric-stubs
$ pip install -U .
First, clone the repo and cd into it, like in Installation, then:
$ pip install -r dev-requirements.txt