{"id":19574263,"url":"https://github.com/vinibiavatti1/pythonflaskkit","last_synced_at":"2026-05-03T11:32:28.524Z","repository":{"id":122462284,"uuid":"387782643","full_name":"vinibiavatti1/PythonFlaskKit","owner":"vinibiavatti1","description":"Starter kit library for Python Flask projects","archived":false,"fork":false,"pushed_at":"2025-08-03T16:50:25.000Z","size":6659,"stargazers_count":1,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-08-03T18:27:15.636Z","etag":null,"topics":["flask","jinja","jinja2","kit","python","python3","skeleton","starter","starter-kit","template"],"latest_commit_sha":null,"homepage":"","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vinibiavatti1.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"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":"2021-07-20T12:20:44.000Z","updated_at":"2025-08-03T16:50:29.000Z","dependencies_parsed_at":null,"dependency_job_id":"a8bae791-62f5-44fd-84ef-d2d7a23be920","html_url":"https://github.com/vinibiavatti1/PythonFlaskKit","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/vinibiavatti1/PythonFlaskKit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vinibiavatti1%2FPythonFlaskKit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vinibiavatti1%2FPythonFlaskKit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vinibiavatti1%2FPythonFlaskKit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vinibiavatti1%2FPythonFlaskKit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vinibiavatti1","download_url":"https://codeload.github.com/vinibiavatti1/PythonFlaskKit/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vinibiavatti1%2FPythonFlaskKit/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32567235,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-03T06:36:36.687Z","status":"ssl_error","status_checked_at":"2026-05-03T06:36:09.306Z","response_time":103,"last_error":"SSL_read: 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":["flask","jinja","jinja2","kit","python","python3","skeleton","starter","starter-kit","template"],"created_at":"2024-11-11T06:39:24.848Z","updated_at":"2026-05-03T11:32:28.509Z","avatar_url":"https://github.com/vinibiavatti1.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Python Flask Kit\nThe Python Flask Kit is a starter kit with util pre-implemented features for [Python Flask](https://flask.palletsprojects.com/en/2.0.x/) projects that follow concepts of MVC. It uses the [Jinja](https://jinja.palletsprojects.com/en/3.0.x/) library to render HTML templates. This kit includes a collections of utilities, default patterns, configurations, etc. Some plugins are defined into this lib like [Bootstrap 5](https://getbootstrap.com/) and other utility plugins. You can also find internationalization classes in the kit to develop a multi-cultural application. The purpose of the kit is to facilitate our development and give it to us as a base for our projects. It is not a framework, it is just a library to help us a lot!\n\n## Installation\nThe Python 3 is required for this project. Download or clone this repository in your project diretory and install the Python Environment and the dependencies of the project by executing the `run_setup.bat` file. This file will create a new Python environment in `.env` folder, and use `pip` to install the dependencies. To start the server, just execute `run_flask_dev.bat`, `run_flask_test.bat` or `run_flask_prod.bat` depending on the environment you want to start the application on.\n\n## Configuration\nThere are three config files in the `/project/configs` directory. Each one corresponds to a specific environment. For example, if you run the `run_flask_test.bat` file, the `config_test.py` file will be used to define the configurations.\n\n## Resources\nThe project is separated by areas that contains a specific type of resource. Check below some lists of the contents of the directories and a small description about the project files: \n\n### Project Files\n\nFile|Description\n---|---\n`blueprints.py`|Python flask entities register module\n`config.py`|Configuration handler by environment\n`errors.py`|Application error classes\n`handlers.py`|HTTP error handlers\n`i18n.py`|Internationalization utils\n`menus.py`|Sidebar menus registration\n`processors.py`|Jinja context processors\n\n### Project Directories\n\nDirectory|Description\n---|---\n`/configs`|Configuration files for each environment\n`/controllers`|Route controllers\n`/enums`|Enumerations\n`/models`|Data classes\n`/repositories`|Database management functions \n`/services`|Business rules functions\n`/translations`|Translation dictionaries for each idiom\n`/utils`|Common application functions\n`/validators`|Data validators functions\n\n### Templates Directories\n\nDirectory|Description\n---|---\n`/admin`|Templates for authenticated users\n`/errors`|HTTP error templates\n`/macros`|Macro templates (\"DRY\" concept)\n`/private`|Owner templates\n`/public`|Templates for no authenticated users \n\n### Static Directories\n\nDirectory|Description\n---|---\n`/documents`|Text files\n`/medias`|Media files\n`/plugins`|External libraries\n`/scripts`|JS files\n`/styles`|CSS files\n\n## Utils\nThe util modules have default functionalities for usage in entire of application. There are different kinds of utils that can be used for specified operation. Check the table below for more details:\n\nUtil|Definition\n---|---\n`cookie_utils.py`|Functions to work with cookies\n`ctrl_utils.py`|Controller util functionalities\n`database_utils.py`|Database manipulation functions\n`datetime_utils.py`|Date and datetime functions\n`mail_utils.py`|Mail sender functions\n`security_utils.py`|Security and authentication routines\n`translation_utils.py`|Internationalization functions\n\n## Blueprints\nThe blueprints are resources that can be registered into Python Flask Engine, such as controllers, processors, etc. The file `project/blueprints.py` contains a list of blueprints that will be registered automatically when the application is running. New blueprints should be put inside this list.\n\n## Context Processors\nContext processors are routines that will be called before rendering the Jinja templates, in order to define some global properties to be allowed for usage on the HTML templates. These routines can be found at `/project/processors.py` file.\n\n## Internationalization\nYou can define multiple translation files in `/project/translations` directory. These translation files uses a Python Dictionary, where each application message has its own key, and this key will be allowed for usage on templates by a Context Processor function called `inject_dictionary()`. The translation dictionary will be injected to Jinja templates depending on the idiom defined in the website `lang` cookie, so, if the lang cookie is defined with `en_us` value, the `en_us.py` dictionary will be injected by the Context Processor. The translation dictionary keys are located in a variable called `i18n`. For example, you can render the welcome message in HTML file by coding:\n```jinja\n\u003cp\u003e{{ i18n.general.welcome }}\u003c/p\u003e\n```  \n\n## Layout\nThe `layout.html` file is the base file that is used to render any template of the website. All templates should extend the layout file. In layout, some macros are imported and rendered automatically. The CSS, JS and metatags are defined into the `/macros/headers.html` file. Any new library that need to be imported to the website should be defined into this file.\n\n## Macros\nMacro is a HTML file with the contents defined inside functions. It allows developer to create common templates that could be used in different parts of the application. Some parameters can be defined for these functions to handle the macro templates dinamically. They are useful to put often used idioms into reusable functions to not repeat yourself (\"DRY\").\n\n```jinja\n{# Alert Macro #}\n{% macro alert(message, type, dismissible = true) %}\n    \u003cdiv class=\"alert alert-{{type}} {{ 'alert-dismissible' if dismissible else '' }}\"\u003e\n        {{message}}\n        {% if dismissible %}\n        \u003cbutton type=\"button\" class=\"btn-close\" data-bs-dismiss=\"alert\"\u003e\u003c/button\u003e\n        {% endif %}\n    \u003c/div\u003e\n{% endmacro %}\n\n{# Usage example #}\n{{ alert('Hello world!', 'success') }}\n```\n\n## Thanks\nI hope this lib can help you to start any Python Flask project you want. Thanks!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvinibiavatti1%2Fpythonflaskkit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvinibiavatti1%2Fpythonflaskkit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvinibiavatti1%2Fpythonflaskkit/lists"}