flask boilerplate
Python hosting: Host, run, and code Python in the cloud!
In this article you will learn about cookiecutter, a command-line utility that creates projects from project templates. With cookiecutter you can create a new python Flask project. This is similar to a standard Flask project except that using this method you start with several complete templates and a list of features.
Related course:
Python Flask: Make Web Apps with Python
Features
- Bootstrap 3 and Font Awesome 4 with starter templates
- Flask-SQLAlchemy with basic User model
- Easy database migrations with Flask-Migrate
- Flask-WTForms with login and registration forms
- Flask-Login for authentication
- Flask-Bcrypt for password hashing
- Procfile for deploying to a PaaS (e.g. Heroku)
- pytest and Factory-Boy for testing (example tests included)
- A simple
manage.py
script. - CSS and JS minification using Flask-Assets
- Optional bower support for frontend package management
- Caching using Flask-Cache
- Useful debug toolbar
- Utilizes best practices: Blueprints and Application Factory patterns
Install the Flask dependencies:
sudo pip install flask_script |
Install and clone cookieclutter
sudo pip install cookiecutter |
You will be asked some information about your project, enter as you wish:
remote: Counting objects: 1545, done. |
Then enter your project directory (example) and start the server
cd example |
You can then open http://127.0.0.1:5000
Related course:
Python Flask: Make Web Apps with Python
Posted in flask
Leave a Reply: