Create flask modules using a flask shell command
Project description
flask-bucket
Flask-Bucket is an extension that uses the flask command line interface to create a module inside your project directory. It comes in handy when operating in a flask application factory configuaration.
Installation
Run the following command to install:
$ Python pip install flask-bucket
Usage
- Import and initialize the package inside the create_app function.
- Import your module and register your blueprint object.
from flask_bucket import FlaskBucket
def create_app():
app = Flask(__name__)
FlaskBucket(app)
from .<module_name>.routes import <blueprint_name>
app.registerblueprint(<blueprint_name>)
return app
Initialize your module by running the make_module command from an interactive Python shell and specify the name of the directory. Note The package automatically produces a blueprint and a routes layout inside your routes.py file, located inside the module.
$ flask make_module <directory_name>
Developing flask-bucket
To install flask-bucket along with the tools you need to develop and run tests, run the following in your virtual enviroment.
$ pip install -e .[dev]
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
Hashes for flask_bucket-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 98c44c12c557c479636f608832291aded1103b7f3f4e694104244fddd490b94f |
|
MD5 | b65713f5cab18b768381b684107ee17a |
|
BLAKE2b-256 | 3eb8edb335cb650bc70ec58bba946b47248ae9fc43a32afbf1a09c633ed08a55 |