Setting up our environment for the API tutorial.
Within your terminal, change into the complete APIs project:
$ cd new-coder/apis
Make a new virtual environment specific to your API project project:
$ mkvirtualenv APIProj
You should now see
(APIProj) before your prompt. Now, from within the
new-coder/apis directory, run the following to install package requirements with the following command for this project:
(APIProj) $ pip install -r requirements.txt
Your virtual environment will store the required packages in a self-contained area to not mess up with other Python projects.
Lastly, navigate to your project workspace that you setup earlier from the machine setup:
(APIProj) $ cd .. (APIProj) $ cd api_workspace
And then create an empty Python file for your project code:
(APIProj) $ touch api.py
And finally open up
api.py within your own text editor.