Skip to main content

A package that provides type hints for AWS Lambda event, context and response objects

Project description

AWS Lambda Typing

build test License python_version pypi_v pypi_dm

A package that provides type hints for AWS Lambda event, context and response objects. It's a convenient way to get autocomplete and type hints built into IDEs. Type annotations are not checked at runtime but are only enforced by third party tools such as type checkers, IDEs, linters, etc.

Table of Contents

Usage

Example: AWS SQS event

from aws_lambda_typing import context as context_, events


def handler(event: events.SQSEvent, context: context_.Context) -> None:
    for record in event['Records']:
        print(record['body'])

    print(context.get_remaining_time_in_millis())

    message: events.sqs.SQSMessage

Demo

IDE autocomplete

ide_autocomplete

IDE code reference information

code_reference_information

Types

Context

  • Context

Events

  • APIGatewayProxyEventV1
  • APIGatewayProxyEventV2
  • CloudWatchEventsMessageEvent
  • CloudWatchLogsEvent
  • CodePipelineEvent
  • ConfigEvent
  • DynamoDBStreamEvent
  • KinesisFirehoseEvent
  • KinesisStreamEvent
  • MQEvent
  • S3Event
  • S3BatchEvent
  • SESEvent
  • SNSEvent
  • SQSEvent

Responses

  • APIGatewayProxyResponseV1
  • APIGatewayProxyResponseV2
  • S3BatchResponse

Test

Activate virtual environment

poetry shell

Install dependencies

poetry install --remove-untracked

Run tests

mypy tests

Contributing

Contributions are welcome via pull requests.

Issues

If you encounter any problems, please file an issue along with a detailed description.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aws-lambda-typing-2.0.3.tar.gz (11.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

aws_lambda_typing-2.0.3-py3-none-any.whl (19.0 kB view details)

Uploaded Python 3

File details

Details for the file aws-lambda-typing-2.0.3.tar.gz.

File metadata

  • Download URL: aws-lambda-typing-2.0.3.tar.gz
  • Upload date:
  • Size: 11.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.7 CPython/3.8.12 Linux/5.8.0-1042-azure

File hashes

Hashes for aws-lambda-typing-2.0.3.tar.gz
Algorithm Hash digest
SHA256 0fb2b074198681b697f17f06948489955412907423e5f174a9c2809ee9ad4a0e
MD5 01186bd50fef682df70d775de49ca7da
BLAKE2b-256 000a521739f34abfb36bab78405c5a230b5296cd42163a9cc47c70e44a1ed70d

See more details on using hashes here.

File details

Details for the file aws_lambda_typing-2.0.3-py3-none-any.whl.

File metadata

  • Download URL: aws_lambda_typing-2.0.3-py3-none-any.whl
  • Upload date:
  • Size: 19.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.7 CPython/3.8.12 Linux/5.8.0-1042-azure

File hashes

Hashes for aws_lambda_typing-2.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 f3084fc88ecb93978902a232f9ce70431d939db916c39432706c349fc0b302a1
MD5 23ad9f1ea3238bd7f94d91d5c1f59950
BLAKE2b-256 e8bdbd543835240f74db8269813bff20b785a373e8af98696262d5d11d949fd3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page