services:
    ioc.extra.flask.app:
        class: flask.app.Flask
        arguments: ['%ioc.extra.flask.app.name%']
        kwargs:
            static_path:              '%ioc.extra.flask.app.static_path%'
            static_url_path:          '%ioc.extra.flask.app.static_url_path%'
            static_folder:            '%ioc.extra.flask.app.static_folder%'
            template_folder:          '%ioc.extra.flask.app.template_folder%'
            # instance_path:            '%ioc.extra.flask.app.instance_path%'
            instance_relative_config: '%ioc.extra.flask.app.instance_relative_config%'
        calls:
            - [debug, ['%ioc.debug%']]

    ioc.extra.flask.logger:
        class: logging.getLogger
        arguments:
            - 'ioc.flask.app'

    element.command.flask.server:
        class: ioc.extra.flask.command.StartCommand
        arguments: 
            - '@ioc.extra.flask.app'
        tags:
            command:
                - { name: 'flask:start' }