{"id":13501782,"url":"https://github.com/schedutron/flask-common","last_synced_at":"2026-01-17T06:31:28.923Z","repository":{"id":85073017,"uuid":"90320833","full_name":"schedutron/flask-common","owner":"schedutron","description":"A Flask extension with lots of common time-savers (file-serving, favicons, etc). ","archived":false,"fork":false,"pushed_at":"2019-08-20T18:32:21.000Z","size":22,"stargazers_count":234,"open_issues_count":4,"forks_count":34,"subscribers_count":18,"default_branch":"master","last_synced_at":"2025-01-18T05:42:55.871Z","etag":null,"topics":["extension","flask","python"],"latest_commit_sha":null,"homepage":null,"language":"Python","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/schedutron.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,"governance":null,"roadmap":null,"authors":null}},"created_at":"2017-05-05T00:17:45.000Z","updated_at":"2024-11-04T10:07:17.000Z","dependencies_parsed_at":"2023-03-08T20:00:39.118Z","dependency_job_id":null,"html_url":"https://github.com/schedutron/flask-common","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/schedutron%2Fflask-common","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/schedutron%2Fflask-common/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/schedutron%2Fflask-common/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/schedutron%2Fflask-common/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/schedutron","download_url":"https://codeload.github.com/schedutron/flask-common/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246167385,"owners_count":20734381,"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":["extension","flask","python"],"created_at":"2024-07-31T22:01:50.164Z","updated_at":"2026-01-17T06:31:28.905Z","avatar_url":"https://github.com/schedutron.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# flask-common\nA Flask extension with lots of common time-savers (file-serving, favicons, etc).\n\n\nAn example app:\n\n```python\nimport time\nfrom flask import Flask\nfrom flask_common import Common\n\napp = Flask(__name__)\napp.debug = True\n\ncommon = Common(app)\n\n@app.route(\"/\")\n@common.cache.cached(timeout=50)\ndef hello():\n    time.sleep(1)\n    return \"Hello World!\"\n\n\nif __name__ == \"__main__\":\n    common.serve()\n```\n\nNext:\n\n- Put a `favicon.ico` in your `static` folder.\n- Enjoy!\n\n## Nicities\n\nHTTP Headers:\n\n- `X-Powered-By: Flask`.\n- `X-Processed-Time: 0.000133037567139`.\n\nOther nice things:\n\n- `@common.cache.cached(timeout=50)` decorator for caching views in memory.\n- Favicon support (`/favicon.ico` redirects to `/static/favicon.ico`).\n\n## Web Server: Gunicorn + Meinheld\n\nAutomatically uses Gunicorn + Meinheld for production (when `Flask.debug = False`), Flask's dev server for development.\n\nConfiguration environment variables:\n\n- `WEB_CONCURRENCY` for specifying the number of synchronous gunicorn workers.\n-  `PORT` for binding to a specific port.\n\n## File Server: WhiteNoise\n\nFlask-Common automatically configures [WhiteNoise](http://whitenoise.evans.io) to serve your static files.\n\n## Configurations\n\n    app.config['COMMON_FILESERVER_DISABLED'] = 1\n    app.config['COMMON_POWERED_BY_DISABLED'] = 1\n    app.config['COMMON_PROCESSED_TIME_DISABLED'] = 1\n\n## Cache configures\n By default *simple* is a default cache type. But can you change this options, following below steps. [Flask-Caching](https://pythonhosted.org/Flask-Caching/#configuring-flask-caching)\n\n    app.config['COMMON_CACHE_TYPE'] = \"simple\"\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fschedutron%2Fflask-common","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fschedutron%2Fflask-common","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fschedutron%2Fflask-common/lists"}