Last active
December 18, 2015 04:29
-
-
Save mjhea0/5726287 to your computer and use it in GitHub Desktop.
Revisions
-
mjhea0 revised this gist
Jun 7, 2013 . 1 changed file with 14 additions and 12 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,8 +1,6 @@ ## Create a Basic Flask Development Environment This tutorial walks you through setting up the tools you need to begin developing in Python and Flask. *Note:* I assume you are on a Unix environment (OSX, Linux, Linux VM on Windows). ### What you need @@ -16,13 +14,13 @@ This tutorial assumes you are on a Unix enviornment (OSX, Linux, Linux VM on Win ### Python 1. Check your Python version - `python -V` 2. If you already have a 2.7.x version, move on to the next step. 3. If not, download and install the latest 2.7.x [version](http://python.org/download/) ### Git 1. Check your Git version - `git --version` 2. Download the latest [version](http://git-scm.com/download), if necessary ### easy_install and pip @@ -44,18 +42,17 @@ This tutorial assumes you are on a Unix enviornment (OSX, Linux, Linux VM on Win ### virtualenv virtualenv is used to create a self-contained development environment. 1. Install $ sudo pip install virtualenv 2. Setup your local environment $ mkdir new_project $ cd new_project $ virtualenv --no-site-packages flask 3. Activate virtualenv @@ -68,6 +65,12 @@ virtualenv is used to create self-contained development environment. pip install Flask ### Version Control 1. Add a Git repository $ git init ### Text editor 1. Download a text editor. I prefer Sublime. @@ -91,8 +94,7 @@ virtualenv is used to create self-contained development environment. 2. Run the file with your Python interpreter $ python hello.py 3. Point your browser at [http://localhost:5000](http://localhost:5000) to view the hello world greeting. #### Congrats! Flask has taken the *main* stage. Cheers. -
mjhea0 revised this gist
Jun 7, 2013 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -95,4 +95,4 @@ virtualenv is used to create self-contained development environment. 3. Point your browser at [http://localhost:5000](http://localhost:5000) to view the hello world greeting Flask has taken the *main* stage. Cheers. -
mjhea0 revised this gist
Jun 7, 2013 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -95,4 +95,4 @@ virtualenv is used to create self-contained development environment. 3. Point your browser at [http://localhost:5000](http://localhost:5000) to view the hello world greeting *Flask has taken the stage* -
mjhea0 revised this gist
Jun 7, 2013 . 1 changed file with 3 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -93,4 +93,6 @@ virtualenv is used to create self-contained development environment. $ python hello.py * Running on http://127.0.0.1:5000/ 3. Point your browser at [http://localhost:5000](http://localhost:5000) to view the hello world greeting **Flask has taken the stage** -
mjhea0 revised this gist
Jun 7, 2013 . 1 changed file with 9 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -2,7 +2,7 @@ This tutorial walks you through how to setup all the tools you need in order to have a basic programming environment setup for web development vis Python and Flask. This tutorial assumes you are on a Unix enviornment (OSX, Linux, Linux VM on Windows). ### What you need @@ -86,4 +86,11 @@ virtualenv is used to create self-contained development environment. if __name__ == '__main__': app.run() Save the file to your "flask" directory. 2. Run the file with your Python interpreter $ python hello.py * Running on http://127.0.0.1:5000/ 3. Point your browser to [http://localhost:5000](http://localhost:5000) -
mjhea0 revised this gist
Jun 7, 2013 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -2,9 +2,9 @@ This tutorial walks you through how to setup all the tools you need in order to have a basic programming environment setup for web development vis Python and Flask. This tutorial assume you are on a Unix enviornment (OSX, Linux, Linux VM on Windows). ### What you need - Python 2.7.x - easy_install and pip -
mjhea0 revised this gist
Jun 7, 2013 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -4,13 +4,14 @@ This tutorial walks you through how to setup all the tools you need in order to ### What you need First, this tutorial assume you are on a Unix enviornment (OSX, Linux, Linux VM on Windows). - Python 2.7.x - easy_install and pip - Git 1.7/1.8 - virtualenv - Flask - Text editor (Sublime, vim, Komodo, gedit) ### Python -
mjhea0 revised this gist
Jun 7, 2013 . 1 changed file with 47 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -39,4 +39,50 @@ This tutorial walks you through how to setup all the tools you need in order to 4. Install pip $ sudo easy_install pip ### virtualenv virtualenv is used to create self-contained development environment. 1. Install $ sudo pip install virtualenv 2. Setup your local enviornment $ mkdir new_project $ cd new_project $ virtualenv --no-site-packages flask New python executable in flask/bin/python 3. Activate virtualenv $ cd flask $ source bin/activate ### Flask 1. Install pip install Flask ### Text editor 1. Download a text editor. I prefer Sublime. ### Quick Application 1. Create a new file named *hello.py* and add the following code: from flask import Flask app = Flask(__name__) @app.route('/') def hello_world(): return 'Hello World!' if __name__ == '__main__': app.run() Save the file to your "flask" directory. -
mjhea0 revised this gist
Jun 7, 2013 . 1 changed file with 4 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -16,14 +16,14 @@ This tutorial walks you through how to setup all the tools you need in order to 1. Check your Python version - `python -V` 2. If you already have a 2.7.x version, move on to Git. 3. If not, download and install the latest 2.7.x [version](http://python.org/download/) ### Git 1. Check your Git version - `git --version` 2. Download the latest [version](http://git-scm.com/download) ### easy_install and pip 1. Download setuptools for Python 2.7 -
mjhea0 revised this gist
Jun 7, 2013 . 1 changed file with 9 additions and 9 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,8 +1,8 @@ ## Basic Flask Development Enviornment This tutorial walks you through how to setup all the tools you need in order to have a basic programming environment setup for web development vis Python and Flask. ### What you need - Python 2.7.x - easy_install and pip @@ -12,11 +12,11 @@ This tutorial walks you through how to setup all the tools you need in order to - Text editor (Sublime, vim, Komodo, gedit) - Unix OS (OSX, Linux, Linux VM on Windows) ### Python 1. Check your Python version - `python -V` 2. If you already have a 2.7.x version, move on to Git. 3. If not, download and install the latest 2.7.x (version)[http://python.org/download/] ## Git @@ -27,16 +27,16 @@ This tutorial walks you through how to setup all the tools you need in order to 1. Download setuptools for Python 2.7 $ curl -o setuptools-0.6c11-py2.7.egg https://pypi.python.org/packages/2.7/s/setuptools/setuptools-0.6c11-py2.7.egg#md5=fe1f997bc722265116870bc7919059ea 2. Install setup tools $ sudo sh setuptools-0.6c11-py2.7.egg 3. Clean up and delete egg $ rm setuptools-0.6c11-py2.7.egg 4. Install pip $ sudo easy_install pip -
mjhea0 revised this gist
Jun 7, 2013 . 1 changed file with 25 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -14,6 +14,29 @@ This tutorial walks you through how to setup all the tools you need in order to ## Python 1. Check your Python version - `python -V` 2. If you already have a 2.7.x version, move on. 3. If not, download the latest 2.7.x [version](http://python.org/download/) ## Git 1. Check your Git version - `git --version` 2. Download the latest (version)[http://git-scm.com/download] ## easy_install and pip 1. Download setuptools for Python 2.7 curl -o setuptools-0.6c11-py2.7.egg https://pypi.python.org/packages/2.7/s/setuptools/setuptools-0.6c11-py2.7.egg#md5=fe1f997bc722265116870bc7919059ea 2. Install setup tools sudo sh setuptools-0.6c11-py2.7.egg 3. Clean up and delete egg rm setuptools-0.6c11-py2.7.egg 4. Install pip sudo easy_install pip -
mjhea0 revised this gist
Jun 7, 2013 . 1 changed file with 3 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -14,4 +14,6 @@ This tutorial walks you through how to setup all the tools you need in order to ## Python 1. Check to your Python version - `python -V` 2. If you already have a 2.7.x version, move on. 3. If not, download the latest 2.7.x version from [Python.org](http://python.org/download/). -
mjhea0 revised this gist
Jun 7, 2013 . 1 changed file with 1 addition and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -14,6 +14,4 @@ This tutorial walks you through how to setup all the tools you need in order to ## Python 1. Check your Python version `$ python -V` -
mjhea0 revised this gist
Jun 7, 2013 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -16,4 +16,4 @@ This tutorial walks you through how to setup all the tools you need in order to 1. Check your Python version $ python -V -
mjhea0 revised this gist
Jun 7, 2013 . 1 changed file with 7 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -10,4 +10,10 @@ This tutorial walks you through how to setup all the tools you need in order to - virtualenv - Flask - Text editor (Sublime, vim, Komodo, gedit) - Unix OS (OSX, Linux, Linux VM on Windows) ## Python 1. Check your Python version python -V -
mjhea0 revised this gist
Jun 7, 2013 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,7 @@ # Basic Flask Development Enviornment This tutorial walks you through how to setup all the tools you need in order to have a basic programming environment setup for web development vis Python and Flask. ## What you need - Python 2.7.x -
mjhea0 created this gist
Jun 7, 2013 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,11 @@ # Basic Flask Development Enviornment ## What you need - Python 2.7.x - easy_install and pip - Git 1.7/1.8 - virtualenv - Flask - Text editor (Sublime, vim, Komodo, gedit) - Unix OS (OSX, Linux, Linux VM on Windows)