Automatically discover and register Flask blueprints
Project description
Flask-Blueprints-Loader is an extension for Flask that automatically discovers and registers Blueprint for your application.
Installing
Install using pip:
$ pip install -U flask-blueprints-loader
Initialize the Extension
Application Instance Pattern
from flask import Flask
from flask_blueprints_loader import BlueprintsLoader
app = Flask(__name__)
loader = BlueprintsLoader(app)
with app.app_context():
loader.register_blueprints()
Application Factories Pattern
from flask import Flask
from flask_blueprints_loader import BlueprintsLoader
loader = BlueprintsLoader()
def create_app():
app = Flask(__name__)
loader.init_app(app)
with app.app_context():
loader.register_blueprints()
return app
Links
Documentation: https://flask-blueprints-loader.readthedocs.io/en/latest/
PyPI Releases: https://pypi.org/project/flask-blueprints-loader/
Source Code: https://github.com/curskey/flask-blueprints-loader/
Issue Tracker: https://github.com/curskey/flask-blueprints-loader/issues/
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for flask_blueprints_loader-0.1.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | cc31a2919bdcb278664606fc14f6e761a577f09569ef25e56b57b0ccd019bb59 |
|
MD5 | 46174ad5463dd7e3923054c0b15ba562 |
|
BLAKE2b-256 | 0f8f7d0ccae26b4b1b9f93d860f00901a70c7f2efb42dd38683f0e0c0c42979b |
Close
Hashes for flask_blueprints_loader-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9988742def5fc1153dd201c7e678d394b72d95eadc13df7d15ff99edfc48c516 |
|
MD5 | df53fe6eb0561d9e532fcc63c2684057 |
|
BLAKE2b-256 | da0529e75f13d7606c61fc8f8c95dd041b5ec547493c77d9993dc6e365a76719 |