{ "info": { "author": "Dominik Muhs", "author_email": "dominik.muhs@outlook.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Topic :: Internet :: WWW/HTTP :: WSGI :: Middleware" ], "description": "# Falcon Stats\n`falcon-stats` is a simple usage statistics middleware for the [Falcon REST framework](https://falconframework.org/). It should primarily enable later analysis that separately gets relevant data from the DB.\n\n## Data Collection\n*Falcon Stats* gathers data on incoming requests and their processed responses. Currently the following features are saved:\n\n- Response Timestamp\n- Processing Time between Request and Response\n- Request Method\n- User Agent\n- Request URI (domain, endpoint and query string)\n- Remote IP (closest to the server)\n- Request Content-Type\n- Response Status\n- Request Content Length\n\nNote that logging and database access add overhead to the processing time. Furthermore it will add a few milliseconds on every response.\n\n## Installation\n... is as easy as\n\n```\npip install falcon-stats\n```\n\nInstallation assumes you have the packages found in *requirements.txt* installed. Please note the development build of SQLAlchemy that is pulled from the official git repository.\n\n## Usage\nIn your main falcon file import the `FalconStatsMiddleware` and add it to the middleware list of your API instance. That's it.\n\n```python\nfrom falconstats import FalconStatsMiddleware\n...\nfsm = FalconStatsMiddleware(\n\tdb_user=\"root\",\n\tdb_pass=\"my-secret-pw\",\n\tdb_addr=\"localhost:3306\",\n\tdb_name=\"stats\"\n)\napp = falcon.API(middleware=[fsm])\n```\n\nThis will connect to the given MySQL database and start to add request-response data. For now only MySQL is supported - *PRs welcome*!\n\n## Compatibility\nThe middleware is used with Python 3.5 and 3.6. I don't plan on supporting Python 2.7 but it still might work.\n\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/dmuhs/falcon-stats", "keywords": "falcon falconframework rest-api statistics middleware", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "falcon-stats", "package_url": "https://pypi.org/project/falcon-stats/", "platform": "", "project_url": "https://pypi.org/project/falcon-stats/", "project_urls": { "Homepage": "https://github.com/dmuhs/falcon-stats" }, "release_url": "https://pypi.org/project/falcon-stats/0.5/", "requires_dist": null, "requires_python": "", "summary": "A simple middleware to gather request-response statistics from the falcon REST framework", "version": "0.5" }, "last_serial": 3017980, "releases": { "0.4.0": [ { "comment_text": "", "digests": { "md5": "de52ee3ef87b1940b5c957f57e2392df", "sha256": "ae2815e352b4ee7a4ade8990276fd238dd666a8ece5f7150b490bb3889261ecf" }, "downloads": -1, "filename": "falcon_stats-0.4.0-py3-none-any.whl", "has_sig": false, "md5_digest": "de52ee3ef87b1940b5c957f57e2392df", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 5906, "upload_time": "2017-07-12T13:32:30", "url": "https://files.pythonhosted.org/packages/46/9e/82faea99ec48e67db270476b46787f04c6327428a9028126c0415a9d0119/falcon_stats-0.4.0-py3-none-any.whl" } ], "0.5": [ { "comment_text": "", "digests": { "md5": "21e9de344035cec95f9b17fffc086546", "sha256": "c75f9a2ab18715503075dc9dce2114f4dff148a4288d37ed22b18175b9703377" }, "downloads": -1, "filename": "falcon_stats-0.5-py3-none-any.whl", "has_sig": false, "md5_digest": "21e9de344035cec95f9b17fffc086546", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 7472, "upload_time": "2017-07-12T16:03:08", "url": "https://files.pythonhosted.org/packages/84/9f/4287ed56d908d7bf209fd46fe9904bf9c85aa3aad91681d05bbcf875d96a/falcon_stats-0.5-py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "21e9de344035cec95f9b17fffc086546", "sha256": "c75f9a2ab18715503075dc9dce2114f4dff148a4288d37ed22b18175b9703377" }, "downloads": -1, "filename": "falcon_stats-0.5-py3-none-any.whl", "has_sig": false, "md5_digest": "21e9de344035cec95f9b17fffc086546", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 7472, "upload_time": "2017-07-12T16:03:08", "url": "https://files.pythonhosted.org/packages/84/9f/4287ed56d908d7bf209fd46fe9904bf9c85aa3aad91681d05bbcf875d96a/falcon_stats-0.5-py3-none-any.whl" } ] }