# Path: lamvery/log.py
# def get_logger(name):
#     global logger
#     if logger is None:
#         logger = logging.getLogger(name)
#         logger.setLevel(logging.INFO)
#         handler = ColoredStreamHandler(stream=sys.stderr)
#         handler.setLevel(logging.INFO)
#         handler.setFormatter(
#             logging.Formatter('%(name)s: %(message)s'))
#         logger.removeHandler(handler)
#         logger.addHandler(handler)
#     return logger


import yaml
import os
import re
from collections import OrderedDict
from jinja2 import Environment, FileSystemLoader
from jinja2.exceptions import TemplateNotFound
from lamvery.log import get_logger

    def get_default_api(self):
        init_api = OrderedDict()
        init_api['api_id'] = '<your-rest-api-id>'
        init_api['stage'] = 'dev'
        init_api['cors'] = OrderedDict([
            ('origin', '*',),
            ('methods', ['GET', 'OPTION'],),
            ('headers', ['Content-Type', 'X-Amz-Date', 'Authorization', 'X-Api-Key'],),
        ])
        init_api['configuration'] = OrderedDict([
            ('swagger', '2.0',),
            ('info', OrderedDict([
                ('title', 'Sample API',),
            ]),),
            ('schemes', ['https'],),
            ('paths', OrderedDict([
                ('/', OrderedDict([
                    ('get', OrderedDict([
                        ('produces', ['application/json'],),
                        ('parameters', [OrderedDict([
                            ('name', 'sample',),
                            ('in', 'query',),
                            ('required', False),
                            ('type', 'string',)])],),
                        ('responses', OrderedDict([
                            ('200', OrderedDict([
                                ('description', '200 response',),
                                ('schema', {'$ref': '#/definitions/Sample'},)])),
                        ]),),

# Path: lamvery/log.py
# def get_logger(name):
#     global logger
#     if logger is None:
#         logger = logging.getLogger(name)
#         logger.setLevel(logging.INFO)
#         handler = ColoredStreamHandler(stream=sys.stderr)
#         handler.setLevel(logging.INFO)
#         handler.setFormatter(
#             logging.Formatter('%(name)s: %(message)s'))
#         logger.removeHandler(handler)
#         logger.addHandler(handler)
#     return logger


# Path: lamvery/config.py
import yaml
import os
import re
from collections import OrderedDict
from jinja2 import Environment, FileSystemLoader
from jinja2.exceptions import TemplateNotFound
from lamvery.log import get_logger


    def get_default_api(self):
        init_api = OrderedDict()
        init_api['api_id'] = '<your-rest-api-id>'
        init_api['stage'] = 'dev'
        init_api['cors'] = OrderedDict([
            ('origin', '*',),
            ('methods', ['GET', 'OPTION'],),
            ('headers', ['Content-Type', 'X-Amz-Date', 'Authorization', 'X-Api-Key'],),
        ])
        init_api['configuration'] = OrderedDict([
            ('swagger', '2.0',),
            ('info', OrderedDict([
                ('title', 'Sample API',),
            ]),),
            ('schemes', ['https'],),
            ('paths', OrderedDict([
                ('/', OrderedDict([
                    ('get', OrderedDict([
                        ('produces', ['application/json'],),
                        ('parameters', [OrderedDict([
                            ('name', 'sample',),
                            ('in', 'query',),
                            ('required', False),
                            ('type', 'string',)])],),
                        ('responses', OrderedDict([
                            ('200', OrderedDict([
                                ('description', '200 response',),
                                ('schema', {'$ref': '#/definitions/Sample'},)])),
                        ]),),

                    ]),),