Metadata-Version: 1.1
Name: aiohttp-debugtoolbar
Version: 0.2.0
Summary: debugtoolbar for aiohttp
Home-page: https://github.com/aio-libs/aiohttp_debugtoolbar
Author: Nikolay Novik
Author-email: nickolainovik@gmail.com
License: Apache 2
Description: aiohttp_debugtoolbar
        ====================
        .. image:: https://travis-ci.org/aio-libs/aiohttp-debugtoolbar.svg?branch=master
            :target: https://travis-ci.org/aio-libs/aiohttp-debugtoolbar
            :alt: |Build status|
        .. image:: https://codecov.io/gh/aio-libs/aiohttp-debugtoolbar/branch/master/graph/badge.svg
          :target: https://codecov.io/gh/aio-libs/aiohttp-debugtoolbar
            :alt: |Coverage status|
        
        
        **aiohttp_debugtoolbar** provides a debug toolbar for your aiohttp_
        web application.  Library is port of pyramid_debugtoolbar_ and
        still in early development stages. Basic functionality has been
        ported:
        
        * basic panels
        * intercept redirects
        * intercept and pretty print exception
        * interactive python console
        * show source code
        
        .. image:: https://raw.githubusercontent.com/aio-libs/aiohttp_debugtoolbar/master/demo/aiohttp_debugtoolba_sceenshot.png
        
        
        Ported Panels
        -------------
        ``HeaderDebugPanel``, ``PerformanceDebugPanel``, ``TracebackPanel``,
        ``SettingsDebugPanel``, ``MiddlewaresDebugPanel``, ``VersionDebugPanel``,
        ``RoutesDebugPanel``,  ``RequestVarsDebugPanel``, ``LoggingPanel``
        
        
        Help Needed
        -----------
        Are you coder looking for a project to contribute to
        python/asyncio libraries? This is the project for you!
        
        
        Install and Configuration
        -------------------------
        ::
        
            $ pip install aiohttp_debugtoolbar
        
        
        In order to plug in ``aiohttp_debugtoolbar``, call
        ``aiohttp_debugtoolbar.setup`` on your app.
        
        .. code:: python
        
            import aiohttp_debugtoolbar
            app = web.Application(loop=loop)
            aiohttp_debugtoolbar.setup(app)
        
        
        Full Example
        ------------
        
        .. code:: python
        
            import asyncio
            import jinja2
            import aiohttp_debugtoolbar
            import aiohttp_jinja2
        
            from aiohttp import web
        
        
            @aiohttp_jinja2.template('index.html')
            def basic_handler(request):
                return {'title': 'example aiohttp_debugtoolbar!',
                        'text': 'Hello aiohttp_debugtoolbar!',
                        'app': request.app}
        
        
            @asyncio.coroutine
            def exception_handler(request):
                raise NotImplementedError
        
        
            @asyncio.coroutine
            def init(loop):
                # add aiohttp_debugtoolbar middleware to you application
                app = web.Application(loop=loop)
                # install aiohttp_debugtoolbar
                aiohttp_debugtoolbar.setup(app)
        
                template = """
                <html>
                    <head>
                        <title>{{ title }}</title>
                    </head>
                    <body>
                        <h1>{{ text }}</h1>
                        <p>
                          <a href="{{ app.router['exc_example'].url() }}">
                          Exception example</a>
                        </p>
                    </body>
                </html>
                """
                # install jinja2 templates
                loader = jinja2.DictLoader({'index.html': template})
                aiohttp_jinja2.setup(app, loader=loader)
        
                # init routes for index page, and page with error
                app.router.add_route('GET', '/', basic_handler, name='index')
                app.router.add_route('GET', '/exc', exception_handler,
                                     name='exc_example')
        
                handler = app.make_handler()
                srv = yield from loop.create_server(handler, '127.0.0.1', 9000)
                print("Server started at http://127.0.0.1:9000")
                return srv, handler
        
        
            loop = asyncio.get_event_loop()
            srv, handler = loop.run_until_complete(init(loop))
            try:
                loop.run_forever()
            except KeyboardInterrupt:
                loop.run_until_complete(handler.finish_connections())
        
        Thanks!
        -------
        
        I've borrowed a lot of code from following projects. I highly
        recommend to check them out:
        
        * pyramid_debugtoolbar_
        * django-debug-toolbar_
        * flask-debugtoolbar_
        
        Play With Demo
        --------------
        
        https://github.com/aio-libs/aiohttp_debugtoolbar/tree/master/demo
        
        Requirements
        ------------
        
        * Python_ 3.4+
        * aiohttp_
        * aiohttp_jinja2_
        
        
        .. _Python: https://www.python.org
        .. _asyncio: http://docs.python.org/3.4/library/asyncio.html
        .. _aiohttp: https://github.com/KeepSafe/aiohttp
        .. _aiopg: https://github.com/aio-libs/aiopg
        .. _aiomysql: https://github.com/aio-libs/aiomysql
        .. _aiohttp_jinja2: https://github.com/aio-libs/aiohttp_jinja2
        .. _pyramid_debugtoolbar: https://github.com/Pylons/pyramid_debugtoolbar
        .. _django-debug-toolbar: https://github.com/django-debug-toolbar/django-debug-toolbar
        .. _flask-debugtoolbar: https://github.com/mgood/flask-debugtoolbar
        
        CHANGES
        -------
        
        0.2.0 (2016-11-08)
        ^^^^^^^^^^^^^^^^^^
        
        * Refactor test suite
        
        0.1.4 (2016-11-07)
        ^^^^^^^^^^^^^^^^^^
        
        * Rename to aiohttp-debugtoolbar
        * Fix imcompatibility with aiohttp==1.1
        
        0.1.3 (2016-10-27)
        ^^^^^^^^^^^^^^^^^^
        
        * Fix a link to request info page, sort request information alphabetically #52
        
        0.1.2 (2016-09-27)
        ^^^^^^^^^^^^^^^^^^
        
        * Fixed empty functions names in performance panel #43 (Thanks @kammala!)
        
        * Fixed flashing message during page rendering issue #46
        
        
        0.1.1 (2016-02-21)
        ^^^^^^^^^^^^^^^^^^
        
        * Fixed a demo
        
        * Added syntax highlight in traceback view, switched highlighter from
          highlight.js to prism.js #31
        
        
        0.1.0 (2016-02-13)
        ^^^^^^^^^^^^^^^^^^
        
        * Fixed python 3.5 support (Thanks @stormandco!)
        
        * Added view source button in RoutesDebugPanel (Thanks @stormandco!)
        
        * Dropped support for Python 3.3 (Thanks @sloria!)
        
        * Add middleware in setup method (Thanks @sloria!)
        
        * Fixed bug with interactive console
        
        * Fixed support for aiohttp>=0.21.1
        
        
        0.0.5 (2015-09-13)
        ^^^^^^^^^^^^^^^^^^
        
        * Fixed IPv6 socket family error (Thanks @stormandco!)
        
        
        0.0.4 (2015-09-05)
        ^^^^^^^^^^^^^^^^^^
        
        * Fixed support for aiohttp>=0.17. (Thanks @himikof!)
        
        
        0.0.3 (2015-07-03)
        ^^^^^^^^^^^^^^^^^^
        
        * Switched template engine from mako to jinja2. (Thanks @iho!)
        
        * Added custom *yield from* to track context switches inside coroutine.
        
        * Implemented panel for collecting request log messages.
        
        * Disable toolbar code injecting for non web.Response answers
          (StreamResponse or WebSocketResponse for example) #12
        
        
        0.0.2 (2015-05-26)
        ^^^^^^^^^^^^^^^^^^
        
        * Redesign UI look-and-feel
        
        * Rename `toolbar_middleware_factory` to just `middleware`.
        
        
        0.0.1 (2015-05-18)
        ^^^^^^^^^^^^^^^^^^
        
        * Initial release.
Platform: UNKNOWN
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Topic :: Internet :: WWW/HTTP
