Skip to main content

A small Python library that includes details mocks of AWS Lambda event sources.

Project description

Serverless Event Mocks

A small Python library that includes detail mocks of Serverless function events. Useful when unit testing your Serverless functions.

Supported Providers and Event Types:

  • AWS: aws
    • API Gateway: api_gateway

This library simply uses default event source mock templates and merges them with any overwrite you provide. Check out the JSON template files to learn more about the data structure of each event source.

Quick Start - Install via pip

pip install serverless-event-mocks


API Gateway

from serverless_event_mocks import create_event

event = create_event(
        "body" : {
            "first_name": "Sam",
            "last_name": "Smith"

Run Tests and Linter

# Run unit tests
make test

# Run Flake8 linter
make lint

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

serverless-event-mocks-0.0.7.tar.gz (3.4 kB view hashes)

Uploaded source

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page