B
    æ¹`Â  ã               @   s2   d dl Z ddlmZ ee jƒG dd„ deƒƒZdS )é    Né   )Úadd_metaclassc               @   sL   e Zd Zejd
dd„ƒZejddd„ƒZejddd„ƒZejddd	„ƒZdS )ÚIWSGIProtocolNc             C   s   dS )a`  
        Create a WSGI application object.

        An example application object may be:

        .. code-block:: python

            def app(environ, start_response):
                start_response(b'200 OK', [(b'Content-Type', b'text/plain')])
                yield [b'hello world\n']

        :param name: The name of the application referenced in the config.
            If ``None`` then it should default to the
            :attr:`plaster.PlasterURL.fragment`, if available.

        :param defaults: A ``dict`` of default values used to populate the
            settings and support variable interpolation. Any values in
            ``defaults`` may be overridden by the loader prior to returning the
            final configuration dictionary.

        :raises LookupError: If a WSGI application cannot be found by the
            specified name.

        N© )ÚselfÚnameÚdefaultsr   r   úY/home/kop/projects/devel/pgwui/test_venv/lib/python3.7/site-packages/plaster/protocols.pyÚget_wsgi_app   s    zIWSGIProtocol.get_wsgi_appc             C   s   dS )a`  
        Create a WSGI application object.

        An example application object may be:

        .. code-block:: python

            def app(environ, start_response):
                start_response(b'200 OK', [(b'Content-Type', b'text/plain')])
                yield [b'hello world\n']

        :param name: The name of the application referenced in the config.
            If ``None`` then it should default to the
            :attr:`plaster.PlasterURL.fragment`, if available.

        :param defaults: A ``dict`` of default values used to populate the
            settings and support variable interpolation. Any values in
            ``defaults`` may be overridden by the loader prior to returning the
            final configuration dictionary.

        :raises LookupError: If a WSGI application cannot be found by the
            specified name.

        Nr   )r   r   r   r   r   r	   Úget_wsgi_app_settings#   s    z#IWSGIProtocol.get_wsgi_app_settingsc             C   s   dS )a¨  
        Create a composable WSGI middleware object.

        An example middleware filter may be:

        .. code-block:: python

            class Filter(object):
                def __init__(self, app):
                    self.app = app

                def __call__(self, environ, start_response):
                    return self.app(environ, start_response)

        :param name: The name of the application referenced in the config.
            If ``None`` then it should default to the
            :attr:`plaster.PlasterURL.fragment`, if available.

        :param defaults: A ``dict`` of default values used to populate the
            settings and support variable interpolation. Any values in
            ``defaults`` may be overridden by the loader prior to returning the
            final configuration dictionary.

        :raises LookupError: If a WSGI filter cannot be found by the
            specified name.

        Nr   )r   r   r   r   r   r	   Úget_wsgi_filter>   s    zIWSGIProtocol.get_wsgi_filterc             C   s   dS )ai  
        Create a WSGI server runner.

        An example server runner may be:

        .. code-block:: python

            def runner(app):
                from wsgiref.simple_server import make_server
                server = make_server('0.0.0.0', 8080, app)
                server.serve_forever()

        :param name: The name of the application referenced in the config.
            If ``None`` then it should default to the
            :attr:`plaster.PlasterURL.fragment`, if available.

        :param defaults: A ``dict`` of default values used to populate the
            settings and support variable interpolation. Any values in
            ``defaults`` may be overridden by the loader prior to returning the
            final configuration dictionary.

        :raises LookupError: If a WSGI server cannot be found by the
            specified name.

        Nr   )r   r   r   r   r   r	   Úget_wsgi_server\   s    zIWSGIProtocol.get_wsgi_server)NN)NN)NN)NN)	Ú__name__Ú
__module__Ú__qualname__ÚabcÚabstractmethodr
   r   r   r   r   r   r   r	   r      s   r   )r   Úcompatr   ÚABCMetaÚobjectr   r   r   r   r	   Ú<module>   s   