Skip to main content

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

flask_blueprints_loader-0.1.0.tar.gz (9.1 kB view details)

Uploaded Source

Built Distribution

flask_blueprints_loader-0.1.0-py3-none-any.whl (4.5 kB view details)

Uploaded Python 3

File details

Details for the file flask_blueprints_loader-0.1.0.tar.gz.

File metadata

File hashes

Hashes for flask_blueprints_loader-0.1.0.tar.gz
Algorithm Hash digest
SHA256 cc31a2919bdcb278664606fc14f6e761a577f09569ef25e56b57b0ccd019bb59
MD5 46174ad5463dd7e3923054c0b15ba562
BLAKE2b-256 0f8f7d0ccae26b4b1b9f93d860f00901a70c7f2efb42dd38683f0e0c0c42979b

See more details on using hashes here.

File details

Details for the file flask_blueprints_loader-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for flask_blueprints_loader-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9988742def5fc1153dd201c7e678d394b72d95eadc13df7d15ff99edfc48c516
MD5 df53fe6eb0561d9e532fcc63c2684057
BLAKE2b-256 da0529e75f13d7606c61fc8f8c95dd041b5ec547493c77d9993dc6e365a76719

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page