Skip to main content

Emulates the conditions of an AWS "Serverless" environment (API Gateway + Lambda) in your test and development environments.

Project description

https://badge.fury.io/py/django-emulate-aws-env.svg https://travis-ci.org/danielholmes/django-emulate-aws-env.svg?branch=master https://codecov.io/gh/danielholmes/django-emulate-aws-env/branch/master/graph/badge.svg

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for django-emulate-aws-env, version 0.2.0
Filename, size File type Python version Upload date Hashes
Filename, size django_emulate_aws_env-0.2.0-py2.py3-none-any.whl (5.4 kB) File type Wheel Python version 3.6 Upload date Hashes View hashes
Filename, size django-emulate-aws-env-0.2.0.tar.gz (5.9 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page