{"id":26878052,"url":"https://github.com/semptek/flask-bluepath","last_synced_at":"2025-03-31T12:19:00.074Z","repository":{"id":284475111,"uuid":"955057986","full_name":"SEMPTEK/flask-bluepath","owner":"SEMPTEK","description":"Automatically detect and initialize flask blueprints located within a specific directory.","archived":false,"fork":false,"pushed_at":"2025-03-28T03:29:28.000Z","size":22,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-28T04:26:51.477Z","etag":null,"topics":["bluepath","blueprints","flask","modules","path-based","simple"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SEMPTEK.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"License.md","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":"2025-03-26T03:28:52.000Z","updated_at":"2025-03-28T03:43:07.000Z","dependencies_parsed_at":"2025-03-28T04:27:03.679Z","dependency_job_id":null,"html_url":"https://github.com/SEMPTEK/flask-bluepath","commit_stats":null,"previous_names":["semptek/flask_modules","semptek/flask-bluepath"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SEMPTEK%2Fflask-bluepath","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SEMPTEK%2Fflask-bluepath/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SEMPTEK%2Fflask-bluepath/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SEMPTEK%2Fflask-bluepath/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SEMPTEK","download_url":"https://codeload.github.com/SEMPTEK/flask-bluepath/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246465257,"owners_count":20781919,"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":["bluepath","blueprints","flask","modules","path-based","simple"],"created_at":"2025-03-31T12:18:59.397Z","updated_at":"2025-03-31T12:19:00.062Z","avatar_url":"https://github.com/SEMPTEK.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Flask BluePath\n\n## Table of Contents\n- [About](#about)\n- [Requirements](#requirements)\n- [Getting Started](#getting-started)\n- [Module Manager](#module-manager)\n- [Credits](#credits)\n\n## About\nFlask BluePath is built for the [Flask](https://palletsprojects.com/projects/flask) framework by [Pallets Projects](https://palletsprojects.com/). This package is designed to allow for quick loading of modules by using the name of the module directory as the name of the corresponding Flask blueprint. The Module Manager will review the directory and determine if the criteria have been met for a module, and it will load it as a blueprint.  \nThis really is a lightweight and simple setup for automating  your blueprint creation. Enjoy!\n\n## Requirements\n- Flask\n- os\n- importlib\n\n## Getting Started\n1. Create a 'Modules' directory and copy the example_module from this directory to use as a template.\n    - Using Flask config variables, you can set the modules directory to any directory within the application. See [Setting the Modules Directory](#setting-the-modules-directory) for more information.\n2. Build your flask module like you would any standard flask app; with the following modifications:\n    - All flask \n3. Be sure to **delete** the \"example_module\" folder prior to production. This module will be loaded as a blueprint if the modules directory is set to default.\n\n## Setting the Modules Directory\nSetting the modules directory can be done using the flask configuration dictionary.\n```python\n# How you set the configuration\napp.config[\"\"]\n# How Flask_Modules pulls the data\napp.config.get(\"MODULES_DIRECTORY\")\n```\n\n## Module Structure\n📦example_module  \n ┣ 📂static  \n ┃ ┣ 📂css  \n ┃ ┃ ┗ 📜example.css  \n ┃ ┣ 📂images  \n ┃ ┗ 📂js  \n ┃ ┃ ┗ 📜example.js  \n ┣ 📂templates  \n ┃ ┗ 📜example.html  \n ┗ 📜routing.py  \n\n ## Module Manager\n The Module Manager is the class that is called to initialize the module system.\n ### Parameters\n - **app**: The Flask application object. ***REQUIRED***\n\n - **rel_dir**: The path to the directory relative to the main flask app.  \n -- Default: \"modules\"  \n\n - **include**: A whitelist of modules to include. Utilizing this parameter will automatically exclude all items not on this list.  \n -- Default: []  \n\n - **exclude**: A blacklist of modules to exclude. Unlike the \"include\" parameter, this doesn't affect any modules outside of the ones in this list.  \n -- Default: []  \n\n - **kill_the_beauty**: Disable the printing of ascii art and additional information for this module. This is recommended when running in a production environment.  \n -- Default: False  \n\n ## Calling Static Files from Templatea\n Calling an image from the blueprint (module's) static folder requires using url_for. See below for the syntax, or view the [Official Jinja Documentation](https://jinja.palletsprojects.com/en/stable/).\n ```\n {{ url_for(\"\u003cmodule_name\u003e.static\") filename=\"images/example.png\" }}\n ```\n\n\n## Credits\nWritten by John D McLaughlin (SLACKSIRE) and distributed under the [MIT License](/License.md), a copy of which can be found in the License.md file located within this package.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsemptek%2Fflask-bluepath","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsemptek%2Fflask-bluepath","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsemptek%2Fflask-bluepath/lists"}