6. Web Applications

Django is a free and open source web framework which allows us to map a requested URL from a user to the code that’s meant to handle that request.

Virtual Environment or “venv” allows you to have a virtual installation of Python and packages on your computer. This allows you to test newer versions of packages that may not be backwards compatible, without breaking your existing production deployment.

Anaconda has a virtual environment handler which may be initiated from the bash terminal. Anything installed within the virtual environment will only be installed for this environment.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
# Creates a new virtual environment using conda with the name "myEnv" and installs the django framework package
conda create --name myEnv django

# Creates a new virtual environment using conda with the name "myEnv" with Python version 3.5
conda create --name myEnv python=3.5

# Activates your virtual environment named "myEnv"
source activate myEnv

# Deactivates your virtual environment named "myEnv"
source deactivate myEnv

# Lists out your virtual environments
conda info --envs