Emulates the conditions of an AWS "Serverless" environment (API Gateway + Lambda) in your test and development environments.
Project description
Emulates the conditions of an AWS “Serverless” environment (API Gateway + Lambda) in your test and development environments (such as those deployed by Zappa).
Quickstart
Install Django Emulate AWS Env:
pip install django-emulate-aws-env
Add the Django Emulate AWS Env middleware. This should be the highest possible priority in your list and just in your development and test environments:
MIDDLEWARE = [
'emulate_aws_env.middleware.modify_request',
...
]
Or if you’re using a dedicated settings file for tests/development:
from .base import *
...
MIDDLEWARE = ['emulate_aws_env.middleware.modify_request'] + MIDDLEWARE
Features
The API Gateway service has the following restrictions which aren’t present in the default environment used to test Django projects:
The provided middleware modifies the request to these restrictions.
Running Tests
Does the code actually work?
source <YOURVIRTUALENV>/bin/activate (myenv) $ pip install tox (myenv) $ tox
Credits
Tools used in rendering this package:
History
0.1.0 (2017-05-05)
First release on PyPI.
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
Hashes for django-emulate-aws-env-0.1.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4897ba2ecbbe8a2226cf8e774c689c484cf3d952cde717b50df555e442605063 |
|
MD5 | 58f90e860ba51a5ac8b894a9bf9cb50b |
|
BLAKE2b-256 | 33c7bcedae4dff0ef71484b9556f6c71356b64aa41a8bb6adc869dbe4e8c6ecc |
Hashes for django_emulate_aws_env-0.1.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a5093d083bef1a83a66313b0e20bb706680d47abe5aa5e43da907179c44ce49c |
|
MD5 | 4f32d8c38a9d0cec1cd621688cc16836 |
|
BLAKE2b-256 | bd8003b1d6a6b58dd38b2e80c0ce372b70149894eb7382e47a24b194c3065430 |