{ "info": { "author": "Andrei Betlen", "author_email": "abetlen@gmail.com", "bugtrack_url": null, "classifiers": [ "Environment :: Web Environment", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Topic :: Internet :: WWW/HTTP :: Dynamic Content", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "# Flask-Perf\n\n[![PyPI version](https://badge.fury.io/py/Flask-Perf.svg)](https://badge.fury.io/py/Flask-Perf)\n[![Build Status](https://travis-ci.org/abetlen/Flask-Perf.svg?branch=master)](https://travis-ci.org/abetlen/Flask-Perf)\n[![Coverage Status](https://coveralls.io/repos/github/abetlen/Flask-Perf/badge.svg?branch=master)](https://coveralls.io/github/abetlen/Flask-Perf?branch=master)\n\nA simple Flask extension for profiling your application code and database queries.\n\n## Installation\n\n```bash\n$ pip install flask_perf\n```\n\n## Example\n\n```python\nfrom flask import Flask, jsonify\nfrom flask_perf import Profiler\n\napp = Flask(__name__)\napp.config[\"PROFILER_ENABLED\"] = True\nprofiler = Profiler(app) # or profiler.init_app(app)\n\n@app.route(\"/\")\ndef index():\n return jsonfiy({\n \"message\": \"Hello World!\"\n })\n```\n\n## Configuration\n\n| Config Name | Description | `default` |\n| :---------- |:------------| -------:|\n| `PROFILER_ENABLED` | Enable the profiler. | `False` |\n| `PROFILER_RESTRICTIONS` | List of profiler restrictions, described in depth in the [Official Python Docs](https://docs.python.org/dev/library/profile.html#pstats.Stats.print_stats) | `[]` |\n| `PROFILER_SQLALCHEMY_ENABLED` | Enable SQLAlchemy query logging. **Note**: This option requires that the `flask_sqlalchemy` package is installed and the `SQLALCHEMY_RECORD_QUERIES` config option is set to `True`. | `False` |\n| `PROFILER_SQLALCHEMY_THRESHOLD` | Minimum query duration in seconds to log. | `0` |\n| `PROFILER_SQLALCHEMY_FORMAT` | Logged SQLAlchemy query format. See the [Flask-SQLAlchemy docs](http://flask-sqlalchemy.pocoo.org/2.3/api/#flask_sqlalchemy.get_debug_queries) for a list of attributes you can use in this format string. | `\"\\n\\n{duration:1.2e}s\\n\\n{statement}\\n\"` |\n\n## Links\n\n- [Blog Post that inspired this package.](https://blog.miguelgrinberg.com/post/the-flask-mega-tutorial-part-xvi-debugging-testing-and-profiling)\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/abetlen/Flask-Perf", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "Flask-Perf", "package_url": "https://pypi.org/project/Flask-Perf/", "platform": "any", "project_url": "https://pypi.org/project/Flask-Perf/", "project_urls": { "Homepage": "https://github.com/abetlen/Flask-Perf" }, "release_url": "https://pypi.org/project/Flask-Perf/0.1.6/", "requires_dist": [ "Flask", "flask-sqlalchemy; extra == 'flask_sqlalchemy'" ], "requires_python": "", "summary": "A simple profiler for flask applications.", "version": "0.1.6" }, "last_serial": 4158345, "releases": { "0.1.4": [ { "comment_text": "", "digests": { "md5": "e073c7c1363097cbe4c6f2ba54909c72", "sha256": "1998994fdfd5de8831ead8ba466b5acf62fd62829c8e52a2133ee8a8add446bf" }, "downloads": -1, "filename": "Flask_Perf-0.1.4-py3-none-any.whl", "has_sig": false, "md5_digest": "e073c7c1363097cbe4c6f2ba54909c72", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 3030, "upload_time": "2018-08-10T17:05:03", "url": "https://files.pythonhosted.org/packages/e6/39/ac2cf20494ca05e3fd5b8bf7c32809f474f7446a31a55680470a8a1ae511/Flask_Perf-0.1.4-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "75a1013fedf2e2f5559c8ff04facfe7b", "sha256": "5d8ad0fd69a66096a4a77ac4e17ff8796023310862149dfab0b312416b9760f4" }, "downloads": -1, "filename": "Flask-Perf-0.1.4.tar.gz", "has_sig": false, "md5_digest": "75a1013fedf2e2f5559c8ff04facfe7b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2857, "upload_time": "2018-08-10T17:05:05", "url": "https://files.pythonhosted.org/packages/98/8f/eec96a15c37ff53e4d81fbb5730a06d9b72a32d2fec445d0757ed70a0edf/Flask-Perf-0.1.4.tar.gz" } ], "0.1.5": [ { "comment_text": "", "digests": { "md5": "3c3c2b25f4299fe24640a25aff02bdd4", "sha256": "a4a009ab552ddbbf56d1f3188d02d8c17c61cd6ee3bd56b5880aa6246edb614a" }, "downloads": -1, "filename": "Flask_Perf-0.1.5-py3-none-any.whl", "has_sig": false, "md5_digest": "3c3c2b25f4299fe24640a25aff02bdd4", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 3114, "upload_time": "2018-08-10T19:47:31", "url": "https://files.pythonhosted.org/packages/0b/6f/d9126622d2331b521827b799aee22e3efa2d95031aeb81f182b8b004584e/Flask_Perf-0.1.5-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "8c6b1b22134d20a68fe60f95c1d03684", "sha256": "cf3ea296cd5a32e328d81af5c2703ce12370b398bd740f2bd574e9c858220c3d" }, "downloads": -1, "filename": "Flask-Perf-0.1.5.tar.gz", "has_sig": false, "md5_digest": "8c6b1b22134d20a68fe60f95c1d03684", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2976, "upload_time": "2018-08-10T19:47:32", "url": "https://files.pythonhosted.org/packages/be/5d/eef5d92ad4f57997189af010f8a0b895b07e0c23739820d724073bb9f6f2/Flask-Perf-0.1.5.tar.gz" } ], "0.1.6": [ { "comment_text": "", "digests": { "md5": "80c8aee11efabcfd930bbfa9b321ea34", "sha256": "ce1315c92eb44eb4dff05d3a47bcaca2912588062c1068f44d746fc412896aa2" }, "downloads": -1, "filename": "Flask_Perf-0.1.6-py3-none-any.whl", "has_sig": false, "md5_digest": "80c8aee11efabcfd930bbfa9b321ea34", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 3150, "upload_time": "2018-08-10T20:40:14", "url": "https://files.pythonhosted.org/packages/d6/8f/141cad090264bff340069d3e367f7c16318e334aa411a0d9a294a329021f/Flask_Perf-0.1.6-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "aceed0de7e4ba3e02b8f48218eada2cc", "sha256": "9357986f9793f366d4d3cfbbd58a6f0b1013f02c705a1006b282a3addceb62a0" }, "downloads": -1, "filename": "Flask-Perf-0.1.6.tar.gz", "has_sig": false, "md5_digest": "aceed0de7e4ba3e02b8f48218eada2cc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2998, "upload_time": "2018-08-10T20:40:15", "url": "https://files.pythonhosted.org/packages/da/35/feeac52ce12586a6063f31097134856268159491971b1afb65643761c545/Flask-Perf-0.1.6.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "80c8aee11efabcfd930bbfa9b321ea34", "sha256": "ce1315c92eb44eb4dff05d3a47bcaca2912588062c1068f44d746fc412896aa2" }, "downloads": -1, "filename": "Flask_Perf-0.1.6-py3-none-any.whl", "has_sig": false, "md5_digest": "80c8aee11efabcfd930bbfa9b321ea34", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 3150, "upload_time": "2018-08-10T20:40:14", "url": "https://files.pythonhosted.org/packages/d6/8f/141cad090264bff340069d3e367f7c16318e334aa411a0d9a294a329021f/Flask_Perf-0.1.6-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "aceed0de7e4ba3e02b8f48218eada2cc", "sha256": "9357986f9793f366d4d3cfbbd58a6f0b1013f02c705a1006b282a3addceb62a0" }, "downloads": -1, "filename": "Flask-Perf-0.1.6.tar.gz", "has_sig": false, "md5_digest": "aceed0de7e4ba3e02b8f48218eada2cc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2998, "upload_time": "2018-08-10T20:40:15", "url": "https://files.pythonhosted.org/packages/da/35/feeac52ce12586a6063f31097134856268159491971b1afb65643761c545/Flask-Perf-0.1.6.tar.gz" } ] }