Skip to content

🏷️ Stubs for AWS Lambda Python Runtime Interface Client(awslambdaric)

License

Notifications You must be signed in to change notification settings

ediskandarov/awslambdaric-stubs

Repository files navigation

mypy logo

Stubs for AWS Lambda Python Runtime Interface Client(awslambdaric)

Test

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,
    }

Installation

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 .

Development Setup

First, clone the repo and cd into it, like in Installation, then:

$ pip install -r dev-requirements.txt

About

🏷️ Stubs for AWS Lambda Python Runtime Interface Client(awslambdaric)

Topics

Resources

License

Stars

Watchers

Forks

Languages