{ "info": { "author": "", "author_email": "", "bugtrack_url": null, "classifiers": [], "description": "# Azure's Application insights for Starlette\n\nThis is a small module to use Azure's Application insights on a [Starlette](https://www.starlette.io/) application.\n\nHow to use:\n\n from starlette.applications import Starlette\n from starlette.middleware.base import BaseHTTPMiddleware\n\n app = Starlette()\n\n from .appinsight import AppInsights\n insights = AppInsights('')\n\n app.add_exception_handler(Exception, insights.exception_handler)\n\n app.add_middleware(BaseHTTPMiddleware, dispatch=insights.request_middleware)\n app.add_middleware(BaseHTTPMiddleware, dispatch=insights.flush_middleware)\n\n # or any variation of how you log in your app\n logging.getLogger(__name__).addHandler(insights.log_handler)\n\n\n @app.route('/')\n async def homepage(request):\n return JSONResponse({'hello': 'world'})\n \n if __name__ == '__main__':\n uvicorn.run(app, host='0.0.0.0', port=8000)\n\nAt this point, any request, log message or exception will be pushed to Azure's application insights.", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "applicationinsights-starlette", "package_url": "https://pypi.org/project/applicationinsights-starlette/", "platform": "", "project_url": "https://pypi.org/project/applicationinsights-starlette/", "project_urls": null, "release_url": "https://pypi.org/project/applicationinsights-starlette/0.1.0/", "requires_dist": null, "requires_python": "", "summary": "", "version": "0.1.0" }, "last_serial": 5469767, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "e402a420a6f96e1cc13eec6c84b641bb", "sha256": "c762e264d9c01760c82328b5cf5b04251208007943d601e371417b1b74c4d0d7" }, "downloads": -1, "filename": "applicationinsights-starlette-0.1.0.tar.gz", "has_sig": false, "md5_digest": "e402a420a6f96e1cc13eec6c84b641bb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1900, "upload_time": "2019-07-01T06:22:16", "url": "https://files.pythonhosted.org/packages/ad/bf/492518cec828292639d58fa0f982bca1fab223551ce95d73c96812f69ade/applicationinsights-starlette-0.1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "e402a420a6f96e1cc13eec6c84b641bb", "sha256": "c762e264d9c01760c82328b5cf5b04251208007943d601e371417b1b74c4d0d7" }, "downloads": -1, "filename": "applicationinsights-starlette-0.1.0.tar.gz", "has_sig": false, "md5_digest": "e402a420a6f96e1cc13eec6c84b641bb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1900, "upload_time": "2019-07-01T06:22:16", "url": "https://files.pythonhosted.org/packages/ad/bf/492518cec828292639d58fa0f982bca1fab223551ce95d73c96812f69ade/applicationinsights-starlette-0.1.0.tar.gz" } ] }