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

  • ALBEvent
  • ApacheKafkaEvent
  • APIGatewayRequestAuthorizerEvent
  • APIGatewayTokenAuthorizerEvent
  • APIGatewayProxyEventV1
  • APIGatewayProxyEventV2
  • AppSyncResolverEvent
  • CloudFormationCustomResourceEvent
  • CloudWatchEventsMessageEvent (Deprecated since version 2.10.0: use EventBridgeEvent instead.)
  • CloudWatchLogsEvent
  • CodeCommitMessageEvent
  • CodePipelineEvent
  • CognitoCustomMessageEvent
  • CognitoPostConfirmationEvent
  • ConfigEvent
  • DynamoDBStreamEvent
  • EventBridgeEvent
  • EC2ASGCustomTerminationPolicyEvent
  • IoTPreProvisioningHookEvent
  • KinesisFirehoseEvent
  • KinesisStreamEvent
  • MQEvent
  • MSKEvent
  • S3Event
  • S3BatchEvent
  • SecretsManagerRotationEvent
  • SESEvent
  • SNSEvent
  • SQSEvent
  • WebSocketConnectEvent
  • WebSocketRouteEvent

Requests

  • SNSPublish
  • SNSPublishBatch

Responses

  • ALBResponse
  • APIGatewayAuthorizerResponse
  • APIGatewayProxyResponseV1
  • APIGatewayProxyResponseV2
  • DynamoDBBatchResponse
  • IoTPreProvisioningHookResponse
  • KinesisFirehoseTransformationResponse
  • S3BatchResponse

Other

  • PolicyDocument

Contributing

Contributions are welcome! See the Contributing Guide.

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.20.0.tar.gz (19.4 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.20.0-py3-none-any.whl (35.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: aws-lambda-typing-2.20.0.tar.gz
  • Upload date:
  • Size: 19.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.2.1 CPython/3.10.14 Linux/6.5.0-1016-azure

File hashes

Hashes for aws-lambda-typing-2.20.0.tar.gz
Algorithm Hash digest
SHA256 78b0d8ebab73b3a6b0da98a7969f4e9c4bb497298ec50f3217da8a8dfba17154
MD5 f51f4bd5786b107efd713ea36ed60fe8
BLAKE2b-256 ba2a14e7a3dba738265db6eddfd0c9ec1619c0c14e48fcf70627fc75fca83305

See more details on using hashes here.

File details

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

File metadata

  • Download URL: aws_lambda_typing-2.20.0-py3-none-any.whl
  • Upload date:
  • Size: 35.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.2.1 CPython/3.10.14 Linux/6.5.0-1016-azure

File hashes

Hashes for aws_lambda_typing-2.20.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1d44264cabfeab5ac38e67ddd0c874e677b2cbbae77a42d0519df470e6bbb49b
MD5 8f41d2826ad3a4dbf4e5384115544dd7
BLAKE2b-256 553d4031f5950d65e89136d20a18b5ac985d5f087c29c902f285b6e8063619e4

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