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
File details
Details for the file django-emulate-aws-env-0.2.0.tar.gz
.
File metadata
- Download URL: django-emulate-aws-env-0.2.0.tar.gz
- Upload date:
- Size: 5.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ac0671de117901165b874454a0fb4e8f79aa7022d1b2312cf0e8674433c4cdb4 |
|
MD5 | 143fe6ceafe1d8b251aa2f2394c5fd82 |
|
BLAKE2b-256 | 2c977d8dce231f6fd898ff0ede28bd7829f2b11442c39f5e7250703154fd54e7 |
File details
Details for the file django_emulate_aws_env-0.2.0-py2.py3-none-any.whl
.
File metadata
- Download URL: django_emulate_aws_env-0.2.0-py2.py3-none-any.whl
- Upload date:
- Size: 5.4 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cc20f38505ff9a96749c671ef077ed1f02634df501e8f10628ed84ab83b885f2 |
|
MD5 | 80ad5b4694725bc7e5fb074966a79b4a |
|
BLAKE2b-256 | 177a2752ab60204b563849d1d3e7c86540f9de004d58e248de1d9d3bc1455ece |