This is my adventure of learning Python and Flask.
I'm following the multi-part tutorial at https://blog.miguelgrinberg.com/post/the-flask-mega-tutorial-part-i-hello-world for this repo.
The tutorial walks you through developing a microblogging server that he calls microblog.
Here's some of the components he walks us through:
- User Management
- Database Management
- Web Forms
- Pagination of long lists
- Full text search
- Email notifications/alerts
- HTML Templates
- Support for multiple languages
- Caching and performance optimizations
- Debugging techniques for dev/prod
- I'm super excited about this one!
- Installation of all on prod server
- I believe we end up using Heroku at the end of the tutorial
I tried this on Python 2.7, but found that Python 3 just worked. Pylint with cray-cray until I switched over the Py3... so just use it from the get-go and you'll be good.
Other than that, I used PowerShell in VS Code and went to town there for my terminal through out the tutorial.
Go here: Download Python 3.x
Create your microblog directory and then create a virtual environment for Python 3 for development by doing
$ python -m venv flask
That will create a virtual environment for Python 3 in a directory named Flask.
We'll use pip that was installed into our Python 3 virtual environment to download & install all necessary dependencies.
$ flask/bin/pip install flask
$ flask/bin/pip install flask-login
$ flask/bin/pip install flask-openid
$ flask/bin/pip install flask-mail
$ flask/bin/pip install flask-sqlalchemy
$ flask/bin/pip install sqlalchemy-migrate
$ flask/bin/pip install flask-whooshalchemy
$ flask/bin/pip install flask-wtf
$ flask/bin/pip install flask-babel
$ flask/bin/pip install guess_language
$ flask/bin/pip install flipflop
$ flask/bin/pip install coverage
$ flask\Scripts\pip install flask
$ flask\Scripts\pip install flask-login
$ flask\Scripts\pip install flask-openid
$ flask\Scripts\pip install flask-mail
$ flask\Scripts\pip install flask-sqlalchemy
$ flask\Scripts\pip install sqlalchemy-migrate
$ flask\Scripts\pip install flask-whooshalchemy
$ flask\Scripts\pip install flask-wtf
$ flask\Scripts\pip install flask-babel
$ flask\Scripts\pip install guess_language
$ flask\Scripts\pip install flipflop
$ flask\Scripts\pip install coverage
Now, you're ready to follow the wise words of Miguel Grinberg, https://github.com/miguelgrinberg