Metadata-Version: 2.4
Name: lambdaforge-local
Version: 0.1.0
Summary: Local AWS Lambda testing: generate realistic trigger events and invoke handlers with mocked AWS services
Project-URL: Homepage, https://github.com/TretiqHiks/lambdaforge
Project-URL: Source, https://github.com/TretiqHiks/lambdaforge
Author: TretiqHiks
License: MIT
Keywords: aws,cli,lambda,local,moto,testing
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Software Development :: Testing
Requires-Python: >=3.9
Requires-Dist: boto3>=1.26
Requires-Dist: click>=8.0
Requires-Dist: moto[all]>=4.0
Requires-Dist: rich>=13.0
Provides-Extra: dev
Requires-Dist: pytest>=7.0; extra == 'dev'
Description-Content-Type: text/markdown

# lambdaforge

> Local AWS Lambda testing made simple.

Generate realistic trigger event payloads and invoke your Python Lambda handler locally — with optional in-memory AWS service mocking via [moto](https://docs.getmoto.org/). No Docker. No SAM. No LocalStack.

## Install

```bash
pip install lambdaforge
```

## Quick Start

```bash
# 1. Generate a realistic event file for your trigger type
lambdaforge generate --trigger apigateway

# 2. Edit event.json with your actual path, body, etc.

# 3. Invoke your handler
lambdaforge invoke --handler src/handler.py::lambda_handler

# With mocked DynamoDB and S3 (boto3 calls intercepted, no real AWS)
lambdaforge invoke --handler src/handler.py::lambda_handler --mock dynamodb,s3
```

## Supported Triggers

| Trigger | CLI value |
|---|---|
| API Gateway REST proxy | `apigateway` |
| SQS | `sqs` |
| S3 object created | `s3` |
| SNS | `sns` |
| EventBridge / scheduled | `eventbridge` |

## Supported Mock Services

Pass any combination via `--mock`: `dynamodb`, `s3`, `ssm`, `sqs`, `sns`

> **Note:** Mocked services start empty. Pre-populate state in your handler behind an env var guard if needed. Seed file support is planned for v2.

## How It Works

**`generate`** writes a complete AWS event JSON to a file (default: `event.json`). User-supplied fields are marked with `"<placeholder>"` strings.

**`invoke`** loads your handler via Python's import system, builds a mock `LambdaContext`, optionally activates moto's `mock_aws()` context, and calls `handler(event, context)`. Output is formatted with [rich](https://github.com/Textualize/rich).

## License

MIT
