Skip to content

Instantly share code, notes, and snippets.

@mjhea0
Last active December 18, 2015 04:29
Show Gist options
  • Select an option

  • Save mjhea0/5726287 to your computer and use it in GitHub Desktop.

Select an option

Save mjhea0/5726287 to your computer and use it in GitHub Desktop.

Revisions

  1. mjhea0 revised this gist Jun 7, 2013. 1 changed file with 14 additions and 12 deletions.
    26 changes: 14 additions & 12 deletions flask_development_env.md
    Original file line number Diff line number Diff line change
    @@ -1,8 +1,6 @@
    ## Basic Flask Development Enviornment
    ## Create a Basic Flask Development Environment

    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).
    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 Git.
    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)
    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 self-contained development environment.
    virtualenv is used to create a self-contained development environment.

    1. Install

    $ sudo pip install virtualenv

    2. Setup your local enviornment
    2. Setup your local environment

    $ mkdir new_project
    $ cd new_project
    $ virtualenv --no-site-packages flask
    New python executable in flask/bin/python
    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
    * 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
    3. Point your browser at [http://localhost:5000](http://localhost:5000) to view the hello world greeting.

    Flask has taken the *main* stage. Cheers.
    #### Congrats! Flask has taken the *main* stage. Cheers.
  2. mjhea0 revised this gist Jun 7, 2013. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion flask_development_env.md
    Original 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*
    Flask has taken the *main* stage. Cheers.
  3. mjhea0 revised this gist Jun 7, 2013. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion flask_development_env.md
    Original 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**
    *Flask has taken the stage*
  4. mjhea0 revised this gist Jun 7, 2013. 1 changed file with 3 additions and 1 deletion.
    4 changes: 3 additions & 1 deletion flask_development_env.md
    Original 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 to [http://localhost:5000](http://localhost:5000)
    3. Point your browser at [http://localhost:5000](http://localhost:5000) to view the hello world greeting

    **Flask has taken the stage**
  5. mjhea0 revised this gist Jun 7, 2013. 1 changed file with 9 additions and 2 deletions.
    11 changes: 9 additions & 2 deletions flask_development_env.md
    Original 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 assume you are on a Unix enviornment (OSX, Linux, Linux VM on Windows).
    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.
    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)
  6. mjhea0 revised this gist Jun 7, 2013. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions flask_development_env.md
    Original 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.

    ### What you need
    This tutorial assume you are on a Unix enviornment (OSX, Linux, Linux VM on Windows).

    First, 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
  7. mjhea0 revised this gist Jun 7, 2013. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion flask_development_env.md
    Original 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)
    - Unix OS (OSX, Linux, Linux VM on Windows)

    ### Python

  8. mjhea0 revised this gist Jun 7, 2013. 1 changed file with 47 additions and 1 deletion.
    48 changes: 47 additions & 1 deletion flask_development_env.md
    Original 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
    $ 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.
  9. mjhea0 revised this gist Jun 7, 2013. 1 changed file with 4 additions and 4 deletions.
    8 changes: 4 additions & 4 deletions flask_development_env.md
    Original 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/]
    3. If not, download and install the latest 2.7.x [version](http://python.org/download/)

    ## Git
    ### Git

    1. Check your Git version - `git --version`
    2. Download the latest (version)[http://git-scm.com/download]
    2. Download the latest [version](http://git-scm.com/download)

    ## easy_install and pip
    ### easy_install and pip

    1. Download setuptools for Python 2.7

  10. mjhea0 revised this gist Jun 7, 2013. 1 changed file with 9 additions and 9 deletions.
    18 changes: 9 additions & 9 deletions flask_development_env.md
    Original file line number Diff line number Diff line change
    @@ -1,8 +1,8 @@
    # Basic Flask Development Enviornment
    ## 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
    ### 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
    ### 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/)
    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
    $ 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
    $ sudo sh setuptools-0.6c11-py2.7.egg

    3. Clean up and delete egg

    rm setuptools-0.6c11-py2.7.egg
    $ rm setuptools-0.6c11-py2.7.egg

    4. Install pip

    sudo easy_install pip
    $ sudo easy_install pip
  11. mjhea0 revised this gist Jun 7, 2013. 1 changed file with 25 additions and 2 deletions.
    27 changes: 25 additions & 2 deletions flask_development_env.md
    Original 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 to your Python version - `python -V`
    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 from [Python.org](http://python.org/download/).
    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
  12. mjhea0 revised this gist Jun 7, 2013. 1 changed file with 3 additions and 1 deletion.
    4 changes: 3 additions & 1 deletion flask_development_env.md
    Original 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 your Python version `$ python -V`
    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/).
  13. mjhea0 revised this gist Jun 7, 2013. 1 changed file with 1 addition and 3 deletions.
    4 changes: 1 addition & 3 deletions flask_development_env.md
    Original 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
    1. Check your Python version `$ python -V`
  14. mjhea0 revised this gist Jun 7, 2013. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion flask_development_env.md
    Original 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
    $ python -V
  15. mjhea0 revised this gist Jun 7, 2013. 1 changed file with 7 additions and 1 deletion.
    8 changes: 7 additions & 1 deletion flask_development_env.md
    Original 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)
    - Unix OS (OSX, Linux, Linux VM on Windows)

    ## Python

    1. Check your Python version

    python -V
  16. mjhea0 revised this gist Jun 7, 2013. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions flask_development_env.md
    Original 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
  17. mjhea0 created this gist Jun 7, 2013.
    11 changes: 11 additions & 0 deletions flask_development_env.md
    Original 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)