{"id":15473481,"url":"https://github.com/seluj78/flask-utils","last_synced_at":"2025-04-25T16:31:48.123Z","repository":{"id":243506871,"uuid":"812559280","full_name":"Seluj78/flask-utils","owner":"Seluj78","description":"Various Flask utilities that I find useful in my projects","archived":false,"fork":false,"pushed_at":"2024-11-04T16:57:42.000Z","size":188,"stargazers_count":2,"open_issues_count":13,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-11-04T17:45:49.091Z","etag":null,"topics":["flask","hacktoberfest","python","utility"],"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/Seluj78.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-06-09T08:40:51.000Z","updated_at":"2024-09-25T07:06:43.000Z","dependencies_parsed_at":null,"dependency_job_id":"924054b4-d6c7-4775-bcc4-91d1b63ef6e9","html_url":"https://github.com/Seluj78/flask-utils","commit_stats":{"total_commits":92,"total_committers":5,"mean_commits":18.4,"dds":"0.26086956521739135","last_synced_commit":"b92d87baf9ad82784b0c0c06280b32262e7cc38e"},"previous_names":["seluj78/flask-utils"],"tags_count":20,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Seluj78%2Fflask-utils","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Seluj78%2Fflask-utils/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Seluj78%2Fflask-utils/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Seluj78%2Fflask-utils/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Seluj78","download_url":"https://codeload.github.com/Seluj78/flask-utils/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224007888,"owners_count":17240294,"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":["flask","hacktoberfest","python","utility"],"created_at":"2024-10-02T02:53:56.255Z","updated_at":"2025-04-25T16:31:48.106Z","avatar_url":"https://github.com/Seluj78.png","language":"Python","readme":"# This project is archived\n\nI've moved on to using FastAPI in my new company, and I don't feel the need to maintain this anymore\n\n[![Documentation Status](https://readthedocs.org/projects/flask-utils/badge/?version=latest)](https://flask-utils.readthedocs.io/en/latest/?badge=latest)\n![GitHub commit activity](https://img.shields.io/github/commit-activity/m/Seluj78/flask-utils)\n![GitHub commits since latest release](https://img.shields.io/github/commits-since/seluj78/flask-utils/latest)\n![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/seluj78/flask-utils/tests.yml?label=tests)\n![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/seluj78/flask-utils/linting.yml?label=linting)\n![GitHub License](https://img.shields.io/github/license/seluj78/flask-utils)\n[![All Contributors](https://img.shields.io/github/all-contributors/seluj78/flask-utils?color=ee8449\u0026style=flat-square)](#contributors)\n[![codecov](https://codecov.io/gh/Seluj78/flask-utils/graph/badge.svg?token=ChUOweAp4b)](https://codecov.io/gh/Seluj78/flask-utils)\n\n[//]: # (TODO: Uncomment when flask-utils had been freed from pypi)\n[//]: # (![PyPI - Downloads]\u0026#40;https://img.shields.io/pypi/dm/flask-utils\u0026#41;)\n[//]: # (![PyPI - Implementation]\u0026#40;https://img.shields.io/pypi/implementation/flask-utils\u0026#41;)\n[//]: # (![PyPI - Python Version]\u0026#40;https://img.shields.io/pypi/pyversions/flask-utils\u0026#41;)\n[//]: # (![PyPI - Versions from Framework Classifiers]\u0026#40;https://img.shields.io/pypi/frameworkversions/:frameworkName/flask-utils\u0026#41;)\n[//]: # (![PyPI - Wheel]\u0026#40;https://img.shields.io/pypi/wheel/flask-utils\u0026#41;)\n[//]: # (![PyPI - Version]\u0026#40;https://img.shields.io/pypi/v/flask-utils\u0026#41;)\n\n# Flask-Utils\n\nA collection of useful Flask utilities I use every day in my Flask projects.\n\n## Installation\n\n```bash\npip install flask-utils\n```\n\n## Usage\n\n```python\nfrom flask import Flask\nfrom flask_utils import FlaskUtils\nfrom flask_utils import BadRequestError\n\napp = Flask(__name__)\nutils = FlaskUtils(app, register_error_handlers=True)\n\n@app.route('/')\ndef index():\n    raise BadRequestError\n```\n\n```python\nfrom typing import List, Optional\nfrom flask import Flask\nfrom flask_utils import validate_params\n\napp = Flask(__name__)\n\n@app.post('/create-user')\n@validate_params({\"first_name\": str, \"last_name\": str, \"age\": Optional[int], \"hobbies\": List[str]})\ndef create_user():\n    # ...\n    # This will enforce the following rules:\n    # - first_name and last_name must be strings and are required\n    # - age is optional and must be an integer\n    # - hobbies is a list of strings\n    # This is just an example, you can use any type of validation you want\n    return \"User created\"\n```\n\n## Documentation\n\nYou can find the full documentation at [Read the Docs](https://flask-utils.readthedocs.io/en/latest/)\n\n## Testing\n\nInstall uv\n```bash\ncurl -LsSf https://astral.sh/uv/install.sh | sh\n```\n\nRun the tests\n```bash\nuv run tox\n```\n\nOR\n\nRun the tests in a multithreaded fashion\n```bash\nuv run tox -p\n```\n\n\n## Contributors\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section --\u003e\n\u003c!-- prettier-ignore-start --\u003e\n\u003c!-- markdownlint-disable --\u003e\n\u003ctable\u003e\n  \u003ctbody\u003e\n    \u003ctr\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"https://juleslasne.com\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/4641317?v=4?s=100\" width=\"100px;\" alt=\"Jules Lasne\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eJules Lasne\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"#code-Seluj78\" title=\"Code\"\u003e💻\u003c/a\u003e \u003ca href=\"#doc-Seluj78\" title=\"Documentation\"\u003e📖\u003c/a\u003e \u003ca href=\"#infra-Seluj78\" title=\"Infrastructure (Hosting, Build-Tools, etc)\"\u003e🚇\u003c/a\u003e \u003ca href=\"#example-Seluj78\" title=\"Examples\"\u003e💡\u003c/a\u003e \u003ca href=\"#mentoring-Seluj78\" title=\"Mentoring\"\u003e🧑‍🏫\u003c/a\u003e \u003ca href=\"#platform-Seluj78\" title=\"Packaging/porting to new platform\"\u003e📦\u003c/a\u003e \u003ca href=\"#projectManagement-Seluj78\" title=\"Project Management\"\u003e📆\u003c/a\u003e \u003ca href=\"#review-Seluj78\" title=\"Reviewed Pull Requests\"\u003e👀\u003c/a\u003e \u003ca href=\"#tutorial-Seluj78\" title=\"Tutorials\"\u003e✅\u003c/a\u003e\u003c/td\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"https://github.com/Mews\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/60406199?v=4?s=100\" width=\"100px;\" alt=\"Mews\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eMews\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"#doc-Mews\" title=\"Documentation\"\u003e📖\u003c/a\u003e \u003ca href=\"#tutorial-Mews\" title=\"Tutorials\"\u003e✅\u003c/a\u003e\u003c/td\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"https://mdk.fr\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/239510?v=4?s=100\" width=\"100px;\" alt=\"Julien Palard\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eJulien Palard\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"#ideas-JulienPalard\" title=\"Ideas, Planning, \u0026 Feedback\"\u003e🤔\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n  \u003ctfoot\u003e\n    \u003ctr\u003e\n      \u003ctd align=\"center\" size=\"13px\" colspan=\"7\"\u003e\n        \u003cimg src=\"https://raw.githubusercontent.com/all-contributors/all-contributors-cli/1b8533af435da9854653492b1327a23a4dbd0a10/assets/logo-small.svg\"\u003e\n          \u003ca href=\"https://all-contributors.js.org/docs/en/bot/usage\"\u003eAdd your contributions\u003c/a\u003e\n        \u003c/img\u003e\n      \u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tfoot\u003e\n\u003c/table\u003e\n\n\u003c!-- markdownlint-restore --\u003e\n\u003c!-- prettier-ignore-end --\u003e\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:END --\u003e\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseluj78%2Fflask-utils","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fseluj78%2Fflask-utils","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseluj78%2Fflask-utils/lists"}