A package that provides type hints for AWS Lambda event, context and response objects
Project description
AWS Lambda Typing
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 code reference information
Types
Context
- Context
Events
- ALBEvent
- APIGatewayRequestAuthorizerEvent
- APIGatewayTokenAuthorizerEvent
- APIGatewayProxyEventV1
- APIGatewayProxyEventV2
- AppSyncResolverEvent
- CloudFormationCustomResourceEvent
- CloudWatchEventsMessageEvent (Deprecated since version 2.10.0: use
EventBridgeEventinstead.) - CloudWatchLogsEvent
- CodeCommitMessageEvent
- CodePipelineEvent
- ConfigEvent
- DynamoDBStreamEvent
- EventBridgeEvent
- IoTPreProvisioningHookEvent
- KinesisFirehoseEvent
- KinesisStreamEvent
- MQEvent
- MSKEvent
- S3Event
- S3BatchEvent
- SecretsManagerRotationEvent
- SESEvent
- SNSEvent
- SQSEvent
Requests
- SNSPublish
- SNSPublishBatch
Responses
- ALBResponse
- APIGatewayAuthorizerResponse
- APIGatewayProxyResponseV1
- APIGatewayProxyResponseV2
- IoTPreProvisioningHookResponse
- S3BatchResponse
Other
- PolicyDocument
Develop
Activate virtual environment
poetry shell
Install dependencies
poetry install --remove-untracked
Install git hooks
pre-commit install --hook-type pre-commit
Run tests
mypy src tests
Run linter
flake8 .
Format code
black .
Sort imports
isort .
Contributing
Contributions are welcome via pull requests.
Issues
If you encounter any problems, please file an issue along with a detailed description.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file aws-lambda-typing-2.11.0.tar.gz.
File metadata
- Download URL: aws-lambda-typing-2.11.0.tar.gz
- Upload date:
- Size: 16.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.7 CPython/3.8.12 Linux/5.13.0-1022-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0d45e3f1ab11f7c097c2ef3cbea874350aab1be843be8584a5ac1ce56169985c
|
|
| MD5 |
423f36abbae65ff99f8829fc65448473
|
|
| BLAKE2b-256 |
f7f03942712127bd67acac603b9d8d8c6ad7663c9ff3bec445c767e1d2bda4a9
|
File details
Details for the file aws_lambda_typing-2.11.0-py3-none-any.whl.
File metadata
- Download URL: aws_lambda_typing-2.11.0-py3-none-any.whl
- Upload date:
- Size: 29.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.7 CPython/3.8.12 Linux/5.13.0-1022-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b9ac228f426feb4a18901419d0146500ac5ab235de861e2afa360fbdc79176f2
|
|
| MD5 |
c68ba320c7a35a80517416edc09ed2ec
|
|
| BLAKE2b-256 |
23e6dcdd085416be7c2c93f326dd0fa596783492bcd2dd7496791cbb0135c6ae
|