Skip to Main Content
Learning Flask Framework
book

Learning Flask Framework

by Matt Copperwaite, Charles Leifer
November 2015
Beginner content levelBeginner
250 pages
5h 16m
English
Packt Publishing
Content preview from Learning Flask Framework

Creating your first Flask app

Now that we have the proper tools installed, we're ready to create our first Flask app. To begin, create a directory somewhere convenient that will hold all of your Python projects. At the command prompt or terminal, navigate to your projects directory; mine is /home/charles/projects, or ~/projects for short on Unix-based systems.

$ mkdir ~/projects
$ cd ~/projects

Now we will create a virtualenv. The commands below will create a new directory named hello_flask inside your projects folder that contains a complete, isolated Python environment.

$ virtualenv hello_flask

New python executable in hello_flask/bin/python2.
Also creating executable in hello_flask/bin/python
Installing setuptools............done.
Installing ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Flask Framework Cookbook - Second Edition

Flask Framework Cookbook - Second Edition

Shalabh Aggarwal
Flask Framework Cookbook

Flask Framework Cookbook

Shalabh Aggarwal

Publisher Resources

ISBN: 9781783983360Supplemental Content