Name | auto-blueprints JSON |
Version |
0.1.1
JSON |
| download |
home_page | None |
Summary | Flask blueprints auto discovery |
upload_time | 2024-06-05 12:41:13 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.11 |
license | Copyright © 2024 David <c0d3@gpobox.net> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
keywords |
flask
blueprints
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# Blueprints
Blueprints is a library to perform auto-discovery of Flask blueprints
by scanning the installed packages for blueprints.txt files.
## Discovery
Discovery of blueprints is performed by the register_blueprints method.
All discovered blueprints are stored in a blueprints attribute of the blueprints package.
The attribute is a dictionary containing the blueprint name and associated meta data.
If a blueprint has the url_prefix specified then it is used.
Otherwise, the package name containing the blueprint is used as the url_prefix.
## Installation
pip install --upgrade auto-blueprints
## Running
Blueprints can be run as a module.
python -m blueprints
Blueprints can be run as a command line executable.
blueprints --host 127.0.0.1 --port 5000
If waitress is installed then a server using waitress is started.
If waitress is not installed then the flask development server is started.
## Embedding
Blueprints can be embedded in an existing program very simply.
from flask import Flask
from blueprints import register_blueprints
app = Flask(__name__)
register_blueprints('blueprints.txt', app)
app.run()
## blueprints.txt format
The blueprints.txt file is a multi-line file containing one line per blueprint to import.
The structure of the line is <package>.<module>.<blueprint>.
hello.entry.bp => imports hello.entry and retrieves the bp attribute containing a flask blueprint
## License
MIT Licensed
Raw data
{
"_id": null,
"home_page": null,
"name": "auto-blueprints",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.11",
"maintainer_email": "David <c0d3@gpobox.net>",
"keywords": "flask, blueprints",
"author": null,
"author_email": "David <c0d3@gpobox.net>",
"download_url": "https://files.pythonhosted.org/packages/c5/ef/caa4ca56494b383a7c4fb6486c1da23b79e4de2035fb307129824debdb72/auto_blueprints-0.1.1.tar.gz",
"platform": null,
"description": "# Blueprints\n\nBlueprints is a library to perform auto-discovery of Flask blueprints\nby scanning the installed packages for blueprints.txt files.\n\n## Discovery\n\nDiscovery of blueprints is performed by the register_blueprints method.\nAll discovered blueprints are stored in a blueprints attribute of the blueprints package.\nThe attribute is a dictionary containing the blueprint name and associated meta data.\n\nIf a blueprint has the url_prefix specified then it is used.\nOtherwise, the package name containing the blueprint is used as the url_prefix.\n\n## Installation\n\n pip install --upgrade auto-blueprints\n\n## Running\n\nBlueprints can be run as a module.\n\n python -m blueprints\n\nBlueprints can be run as a command line executable.\n\n blueprints --host 127.0.0.1 --port 5000\n\nIf waitress is installed then a server using waitress is started.\nIf waitress is not installed then the flask development server is started.\n\n## Embedding\n\nBlueprints can be embedded in an existing program very simply.\n\n from flask import Flask\n from blueprints import register_blueprints\n app = Flask(__name__)\n register_blueprints('blueprints.txt', app)\n app.run()\n\n## blueprints.txt format\n\nThe blueprints.txt file is a multi-line file containing one line per blueprint to import.\nThe structure of the line is <package>.<module>.<blueprint>.\n\n hello.entry.bp => imports hello.entry and retrieves the bp attribute containing a flask blueprint\n\n## License\n\nMIT Licensed\n",
"bugtrack_url": null,
"license": "Copyright \u00a9 2024 David <c0d3@gpobox.net> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \u201cSoftware\u201d), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED \u201cAS IS\u201d, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ",
"summary": "Flask blueprints auto discovery",
"version": "0.1.1",
"project_urls": {
"Bug Tracker": "https://github.com/bbc6502/blueprints/issues",
"Homepage": "https://github.com/bbc6502/blueprints"
},
"split_keywords": [
"flask",
" blueprints"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "0b7006b0813f05db50d109b7f1c89b4ed10351d0fd5e5359f42431b60b418321",
"md5": "193709b05635c3f940abc86932a6d421",
"sha256": "029db087854f4636fbccbff0707919f4ce99239f506f9d7fea4318760ea97a02"
},
"downloads": -1,
"filename": "auto_blueprints-0.1.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "193709b05635c3f940abc86932a6d421",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.11",
"size": 5161,
"upload_time": "2024-06-05T12:41:11",
"upload_time_iso_8601": "2024-06-05T12:41:11.828684Z",
"url": "https://files.pythonhosted.org/packages/0b/70/06b0813f05db50d109b7f1c89b4ed10351d0fd5e5359f42431b60b418321/auto_blueprints-0.1.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "c5efcaa4ca56494b383a7c4fb6486c1da23b79e4de2035fb307129824debdb72",
"md5": "0a68baf488b0cf1c14b1127cc3b51329",
"sha256": "da109c09cd29f2ed6451ecfcd0a8bf61858bc3a1c0b2c465ba12d04afe337c3d"
},
"downloads": -1,
"filename": "auto_blueprints-0.1.1.tar.gz",
"has_sig": false,
"md5_digest": "0a68baf488b0cf1c14b1127cc3b51329",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.11",
"size": 3870,
"upload_time": "2024-06-05T12:41:13",
"upload_time_iso_8601": "2024-06-05T12:41:13.690159Z",
"url": "https://files.pythonhosted.org/packages/c5/ef/caa4ca56494b383a7c4fb6486c1da23b79e4de2035fb307129824debdb72/auto_blueprints-0.1.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-06-05 12:41:13",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "bbc6502",
"github_project": "blueprints",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [],
"lcname": "auto-blueprints"
}