This revision includes:
- A handler for requests for which content-type is JSON (from boto3).
- A decorator (generate_boto3_response) to convert XML responses to
JSON (for boto3). This way, existing response templates for boto can
be shared for generating boto3 response.
- Utility class/functions to use botocore's service specification data
(accessible under botocore.data) for type casting, from query
parameters to Python objects and XML to JSON.
- Updates to response handlers/models to cover more EMR end points and
mockable parameters
Adding `moto` to the requirements file for my Django project pulls in `flask`, even though I don't need the server component. By making the `server` 'extra' then there is no hard requirement on flask.
Moto imports a class in boto that did not exist before boto 2.33.0
Partial traceback showing ImportError with versions of boto < 2.33.0:
File "/src/python/moto/moto/__init__.py", line 8, in <module>
from .autoscaling import mock_autoscaling # flake8: noqa
File "/src/python/moto/moto/autoscaling/__init__.py", line 2, in <module>
from .models import autoscaling_backends
File "/src/python/moto/moto/autoscaling/models.py", line 5, in <module>
from moto.elb import elb_backends
File "/src/python/moto/moto/elb/__init__.py", line 2, in <module>
from .models import elb_backends
File "/src/python/moto/moto/elb/models.py", line 4, in <module>
from boto.ec2.elb.attributes import (
ImportError: cannot import name ConnectionSettingAttribute