{"id":13500699,"url":"https://github.com/aio-libs/aiohttp-debugtoolbar","last_synced_at":"2025-03-29T07:31:22.591Z","repository":{"id":29731685,"uuid":"33274959","full_name":"aio-libs/aiohttp-debugtoolbar","owner":"aio-libs","description":"aiohttp_debugtoolbar is library for debugtoolbar support for aiohttp","archived":false,"fork":false,"pushed_at":"2025-03-17T03:29:37.000Z","size":1113,"stargazers_count":197,"open_issues_count":12,"forks_count":31,"subscribers_count":13,"default_branch":"master","last_synced_at":"2025-03-17T04:30:00.466Z","etag":null,"topics":["aiohttp","asyncio"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aio-libs.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGES.rst","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-04-01T21:51:05.000Z","updated_at":"2025-03-17T03:29:40.000Z","dependencies_parsed_at":"2023-12-28T04:24:11.569Z","dependency_job_id":"3f1d5f71-c5f8-4c4f-a7c8-5b117bbcc9ce","html_url":"https://github.com/aio-libs/aiohttp-debugtoolbar","commit_stats":{"total_commits":441,"total_committers":28,"mean_commits":15.75,"dds":0.6870748299319728,"last_synced_commit":"93d721013416788b0101caeca30e541f41aa8fb5"},"previous_names":["aio-libs/aiohttp_debugtoolbar"],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aio-libs%2Faiohttp-debugtoolbar","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aio-libs%2Faiohttp-debugtoolbar/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aio-libs%2Faiohttp-debugtoolbar/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aio-libs%2Faiohttp-debugtoolbar/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aio-libs","download_url":"https://codeload.github.com/aio-libs/aiohttp-debugtoolbar/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246155992,"owners_count":20732355,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aiohttp","asyncio"],"created_at":"2024-07-31T22:01:10.495Z","updated_at":"2025-03-29T07:31:21.640Z","avatar_url":"https://github.com/aio-libs.png","language":"JavaScript","readme":"aiohttp-debugtoolbar\n====================\n.. image:: https://travis-ci.org/aio-libs/aiohttp-debugtoolbar.svg?branch=master\n    :target: https://travis-ci.org/aio-libs/aiohttp-debugtoolbar\n    :alt: |Build status|\n.. image:: https://codecov.io/gh/aio-libs/aiohttp-debugtoolbar/branch/master/graph/badge.svg\n  :target: https://codecov.io/gh/aio-libs/aiohttp-debugtoolbar\n    :alt: |Coverage status|\n.. image:: https://img.shields.io/pypi/v/aiohttp-debugtoolbar.svg\n    :target: https://pypi.python.org/pypi/aiohttp-debugtoolbar\n    :alt: PyPI\n.. image:: https://badges.gitter.im/Join%20Chat.svg\n    :target: https://gitter.im/aio-libs/Lobby\n    :alt: Chat on Gitter\n\n**aiohttp_debugtoolbar** provides a debug toolbar for your aiohttp_\nweb application.  Library is port of pyramid_debugtoolbar_ and\nstill in early development stages. Basic functionality has been\nported:\n\n* basic panels\n* intercept redirects\n* intercept and pretty print exception\n* interactive python console\n* show source code\n\n.. image:: https://raw.githubusercontent.com/aio-libs/aiohttp_debugtoolbar/master/demo/aiohttp_debugtoolba_sceenshot.png\n\n\nPorted Panels\n-------------\n``HeaderDebugPanel``, ``PerformanceDebugPanel``, ``TracebackPanel``,\n``SettingsDebugPanel``, ``MiddlewaresDebugPanel``, ``VersionDebugPanel``,\n``RoutesDebugPanel``,  ``RequestVarsDebugPanel``, ``LoggingPanel``\n\n\nHelp Needed\n-----------\nAre you coder looking for a project to contribute to\npython/asyncio libraries? This is the project for you!\n\n\nInstall and Configuration\n-------------------------\n::\n\n    $ pip install aiohttp_debugtoolbar\n\n\nIn order to plug in ``aiohttp_debugtoolbar``, call\n``aiohttp_debugtoolbar.setup`` on your app.\n\n.. code:: python\n\n    import aiohttp_debugtoolbar\n    app = web.Application(loop=loop)\n    aiohttp_debugtoolbar.setup(app)\n\n\nFull Example\n------------\n\n.. code:: python\n\n    import asyncio\n    import jinja2\n    import aiohttp_debugtoolbar\n    import aiohttp_jinja2\n\n    from aiohttp import web\n\n\n    @aiohttp_jinja2.template('index.html')\n    async def basic_handler(request):\n        return {'title': 'example aiohttp_debugtoolbar!',\n                'text': 'Hello aiohttp_debugtoolbar!',\n                'app': request.app}\n\n\n    async def exception_handler(request):\n        raise NotImplementedError\n\n\n    async def init(loop):\n        # add aiohttp_debugtoolbar middleware to you application\n        app = web.Application(loop=loop)\n        # install aiohttp_debugtoolbar\n        aiohttp_debugtoolbar.setup(app)\n\n        template = \"\"\"\n        \u003chtml\u003e\n            \u003chead\u003e\n                \u003ctitle\u003e{{ title }}\u003c/title\u003e\n            \u003c/head\u003e\n            \u003cbody\u003e\n                \u003ch1\u003e{{ text }}\u003c/h1\u003e\n                \u003cp\u003e\n                  \u003ca href=\"{{ app.router['exc_example'].url() }}\"\u003e\n                  Exception example\u003c/a\u003e\n                \u003c/p\u003e\n            \u003c/body\u003e\n        \u003c/html\u003e\n        \"\"\"\n        # install jinja2 templates\n        loader = jinja2.DictLoader({'index.html': template})\n        aiohttp_jinja2.setup(app, loader=loader)\n\n        # init routes for index page, and page with error\n        app.router.add_route('GET', '/', basic_handler, name='index')\n        app.router.add_route('GET', '/exc', exception_handler,\n                             name='exc_example')\n        return app\n\n\n    loop = asyncio.get_event_loop()\n    app = loop.run_until_complete(init(loop))\n    web.run_app(app, host='127.0.0.1', port=9000)\n\nSettings\n--------\n.. code:: python\n\n    aiohttp_debugtoolbar.setup(app, hosts=['172.19.0.1', ])\n\nSupported options\n\n\n- enabled: The debugtoolbar is disabled if False. By default is set to True.\n- intercept_redirects: If True, intercept redirect and display an intermediate page with a link to the redirect page. By default is set to True.\n- hosts: The list of allow hosts. By default is set to ['127.0.0.1', '::1'].\n- exclude_prefixes: The list of forbidden hosts. By default is set to [].\n- check_host: If False, disable the host check and display debugtoolbar for any host. By default is set to True.\n- max_request_history: The max value for storing requests. By default is set to 100.\n- max_visible_requests: The max value of display requests. By default is set to 10.\n- path_prefix: The prefix of path to debugtoolbar. By default is set to '/_debugtoolbar'.\n\n\nThanks!\n-------\n\nI've borrowed a lot of code from following projects. I highly\nrecommend to check them out:\n\n* pyramid_debugtoolbar_\n* django-debug-toolbar_\n* flask-debugtoolbar_\n\nPlay With Demo\n--------------\n\nhttps://github.com/aio-libs/aiohttp_debugtoolbar/tree/master/demo\n\nRequirements\n------------\n\n* aiohttp_\n* aiohttp_jinja2_\n\n\n.. _Python: https://www.python.org\n.. _asyncio: http://docs.python.org/3/library/asyncio.html\n.. _aiohttp: https://github.com/KeepSafe/aiohttp\n.. _aiopg: https://github.com/aio-libs/aiopg\n.. _aiomysql: https://github.com/aio-libs/aiomysql\n.. _aiohttp_jinja2: https://github.com/aio-libs/aiohttp_jinja2\n.. _pyramid_debugtoolbar: https://github.com/Pylons/pyramid_debugtoolbar\n.. _django-debug-toolbar: https://github.com/django-debug-toolbar/django-debug-toolbar\n.. _flask-debugtoolbar: https://github.com/mgood/flask-debugtoolbar\n","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faio-libs%2Faiohttp-debugtoolbar","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faio-libs%2Faiohttp-debugtoolbar","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faio-libs%2Faiohttp-debugtoolbar/lists"}