realpython/flask-boilerplate is one of the open-source repositories TopGit tracks, currently at 1.6k stars, written primarily in Python. Boilerplate template for a Python Flask application with Flask-SQLAlchemy, Flask-WTF, Fabric, Coverage, and Bootstrap
Snapshot summary built from the project's own GitHub metadata — there's no written TopGit review yet. The page will update automatically when a full review is published.
WHY NO REVIEW YET
TopGit writes full reviews for the most-starred, most-requested repositories. This page is a snapshot until then — see the READ ME tab for the original README in full.
Hello. Want to get started with Flask quickly? Good. You came to the right place. This Flask application framework is pre-configured with Flask-SQLAlchemy, Flask-WTF, Fabric, Coverage, and the Bootstrap frontend (among others). This will get your Flask app up and running on Heroku or PythonAnywhere quickly. Use this starter, boilerplate for all you new Flask projects. Cheers!
Designed for the Real Python course.
Preview the skeleton app here - http://www.flaskboilerplate.com/
EXAMPLE APP: http://flasktaskr.herokuapp.com/
What is Flask? Flask is a microframework for Python based on Werkzeug and Jinja2.
Once installed, open your command-line and run the following command - heroku login. Then follow the prompts:
Enter your Heroku credentials.
Email: [email protected]
Password (typing will be hidden):
Could not find an existing public key.
Would you like to generate one? [Yn]
Generating new SSH public key.
Uploading ssh public key /Users/michaelherman/.ssh/id_rsa.pub
Activate your virtualenv
Heroku recognizes the dependencies needed through a requirements.txt file. Create one using the following command: pip freeze > requirements.txt. Now, this will only create the dependencies from the libraries you installed using pip. If you used easy_install, you will need to add them directly to the file.
Create a Procfile. Open up a text editor and save the following text in it:
web: gunicorn app:app --log-file=-
Then save the file in your applications root or main directory as Procfile (no extension). The word "web" indicates to Heroku that the application will be attached to the HTTP routing stack once deployed.
You app should look similar to this - http://www.flaskboilerplate.com/
Having problems? Look at the Heroku error log:
$ heroku logs
Deploying to PythonAnywhere
Install Git and Python - if you don't already have them, of course.
If you plan on working exclusively within PythonAnywhere, which you can, because it provides a cloud solution for hosting and developing your application, you can skip step one entirely. :)
Sign up for PythonAnywhere, if you haven't already
Once logged in, you should be on the Consoles tab.
Clone this repo:
$ git clone git://github.com/realpython/flask-boilerplate.git
$ cd flask-boilerplate
Click the "Add a new web app" link on the left; by default this will create an app at your-username.pythonanywhere.com, though if you've signed up for a paid "Web Developer" account you can also specify your own domain name here. Once you've decided on the location of the app, click the "Next" button.
On the next page, click the "Flask" option, and on the next page just keep the default settings and click "Next" again.
Once the web app has been created (it'll take 20 seconds or so), you'll see a link near the top of the page, under the "Reload web app" button, saying "It is configured via a WSGI file stored at..." and a filename. Click this, and you get to a page with a text editor.
Put the following lines of code at the start of the WSGI file (changing "your-username" appropriately)
Go to the website http://your-username.pythonanywhere.com/ (or your own domain if you specified a different one earlier), and you should see something like this - http://www.flaskboilerplate.com/.
Now you're ready to start developing!
Need to PUSH your PythonAnywhere repo to Github?
Start a bash console
Run:
$ ssh-keygen -t rsa
Just accept the defaults, then show the public key:
$ cat ~/.ssh/id_rsa.pub
Log in to GitHub.
Go to the "Account settings" option at the top right (currently a wrench and a screwdriver crossed)
Select "SSH Keys" from the list at the left.
Click the "Add SSH key" button at top right.
Enter a title (I suggest something like "From PythonAnywhere" and then paste the output of the previous "cat" command into the Key box.
Click the green "Add key" button. You'll be prompted to enter your password.
PUSH and PULL away!
What's next?
Using Heroku? Make sure you deactivate your virtualenv once you're done deploying: deactivate
Need to reactivate? (1) Unix - source venv/bin/activate (2) Windows - venv\scripts\activate
Add your Google Analytics ID to the main.html file
Add a domain name to Heroku or PythonAnywhere via a CNAME record
TopGit's last sync did not record any GitHub topics for realpython/flask-boilerplate. GitHub topics appear in the right sidebar of a repository page; that's the authoritative place to check.
How active is development on realpython/flask-boilerplate?
The most recent commit recorded on realpython/flask-boilerplate was 2.8 years ago, based on the GitHub push timestamp. The repository has 574 forks — one of the better signals of community interest.
How many stars does realpython/flask-boilerplate have?
realpython/flask-boilerplate has 1.6k GitHub stars — refresh the page for the live number, or check github.com/realpython/flask-boilerplate. TopGit mirrors GitHub's count but does not claim minute-by-minute accuracy.
What is realpython/flask-boilerplate?
realpython/flask-boilerplate (realpython/flask-boilerplate) is a Python project on GitHub. From the project's own README: Boilerplate template for a Python Flask application with Flask-SQLAlchemy, Flask-WTF, Fabric, Coverage, and Bootstrap
What language is realpython/flask-boilerplate written in?
realpython/flask-boilerplate is written primarily in Python. GitHub's language field is based on the largest share of bytes in the default branch.
Read full README in the tab above.
Is flask-boilerplate worth your time?
ChatGPT, Claude and Perplexity can all read this page. Ask one of them what it makes of flask-boilerplate.