{"id":45078627,"url":"https://github.com/fernandobugni/flask-stats","last_synced_at":"2026-02-21T07:01:24.955Z","repository":{"id":50176642,"uuid":"175494561","full_name":"fernandobugni/flask-stats","owner":"fernandobugni","description":"Flask-stats is a simple plugin that allows you to have important information and statistics for the endpoints that you have","archived":false,"fork":false,"pushed_at":"2022-12-08T05:26:24.000Z","size":29,"stargazers_count":2,"open_issues_count":6,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-02-19T16:48:38.437Z","etag":null,"topics":["api-analytics","api-rest","flask","http-server","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fernandobugni.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-03-13T20:32:28.000Z","updated_at":"2020-11-15T14:42:47.000Z","dependencies_parsed_at":"2023-01-24T12:20:13.536Z","dependency_job_id":null,"html_url":"https://github.com/fernandobugni/flask-stats","commit_stats":null,"previous_names":["gaturron/flask-stats"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/fernandobugni/flask-stats","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fernandobugni%2Fflask-stats","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fernandobugni%2Fflask-stats/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fernandobugni%2Fflask-stats/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fernandobugni%2Fflask-stats/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fernandobugni","download_url":"https://codeload.github.com/fernandobugni/flask-stats/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fernandobugni%2Fflask-stats/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29675907,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-21T06:23:40.028Z","status":"ssl_error","status_checked_at":"2026-02-21T06:23:39.222Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["api-analytics","api-rest","flask","http-server","python"],"created_at":"2026-02-19T14:01:14.614Z","updated_at":"2026-02-21T07:01:24.916Z","avatar_url":"https://github.com/fernandobugni.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# flask-stats\n\nFlask-stats is a simple plugin that allows you to have important information and statistics for the endpoints that you have. It collects all the data and then you can access it through endpoints live. This plug-in allows to monitor simple api without the necessity of any payment, such as new relic\n\nStatus: **working progress**\n\n## Instalation\n\n```cmd\npip install flask-api-stats\n```\n\n## A Simple Example\n\n```Python\n\nfrom time import sleep\nfrom flask import Flask\nfrom flask_stats import Stats\n\ns = Stats()\n\napp = Flask(__name__)\ns.init_app(app)\n\n@app.route('/')\ndef hello():\n    sleep(10)\n    return 'Hello World!'\n\nif __name__ == '__main__':\n    app.run()\n```\n\nAdding ```Stats(app)``` allows to register statistics of the API such as response time or configuration. \n\nIn any time, we can enter in ```/endpoints_stats``` to see duration of each endpoint\n```\n{\n    duration: [\n        {\n            endpoint \"/\" : {\n                avg: 10.009691333770752,\n                count: 5,\n                max: 10.010810375213623,\n                min: 10.007489919662476,\n                percentile_25: 10.007489919662476,\n                percentile_50: 10.01064133644104,\n                percentile_75: 10.010623693466187,\n                percentile_90: 10.010810375213623\n            }\n        },\n    ...\n    ]\n}\n```\nOther endpoint is ```/stats``` where we can see uptime, gc_stats and other configurations\n\n```\n{\ngc_stats: {\n    gc.get_debug: 0,\n    gc.get_stats: {\n        collected: 5455,\n        collections: 130,\n        uncollectable: 0\n    ...\n    },\n    uptime: 1210.0311439037323,\n    uptime_readable: {\n        days: 0,\n        hours: 0,\n        minutes: 20,\n        seconds: 10.0311439037323\n    }\n}\n```\n\n## Contact\nPlease if you have any doubt or found any bug report and issue or send an email to fernando.bugni(a)gmail.com\n\n\u003c!---\nComments how to update to pypi\n==============================\nTutorial: https://packaging.python.org/tutorials/packaging-projects/\n\nOfficial: https://pypi.org/manage/projects/\nTest: https://test.pypi.org/manage/projects/\n\n** Upload package\n* python3 -m pip install --user --upgrade setuptools wheel\n* python3 setup.py sdist bdist_wheel\n    dist/\n        example_pkg_YOUR_USERNAME_HERE-0.0.1-py3-none-any.whl\n        example_pkg_YOUR_USERNAME_HERE-0.0.1.tar.gz\n* python3 -m pip install --user --upgrade twine\n* python3 -m twine upload --repository-url https://test.pypi.org/legacy/ dist/*\n    Uploading distributions to https://test.pypi.org/legacy/\n    Enter your username: [your username]\n    Enter your password:\n    Uploading example_pkg_YOUR_USERNAME_HERE-0.0.1-py3-none-any.whl\n    100%|█████████████████████| 4.65k/4.65k [00:01\u003c00:00, 2.88kB/s]\n\n** Installing your newly uploaded package\n* Create a new venv\n* python3 -m pip install --index-url https://test.pypi.org/simple/ --no-deps example-pkg-YOUR-USERNAME-HERE\n\n** To Upload package for production \n* python3 -m twine upload dist/*\n\n--\u003e","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffernandobugni%2Fflask-stats","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffernandobugni%2Fflask-stats","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffernandobugni%2Fflask-stats/lists"}