Note: This is a living document for documentation purposes, and I will be making changes as I go.
I will be building this tool in Python using the Flask framework. This is a pretty simple application, and I wanted to build it to take out some mundane tasks with Blackboard organization creation. Providing a self-help service for end-users in our network. The application can be extended further to include more features, but for now the basics are working. I will show my process of getting things setup all the way to deployment on the Heroku hosting platform.
IDE: There are many choices available for the choosing of a code editor. It really depends on what makes you comfortable. I have used several,PyCharm,Sublime, and an online editor,Cloud 9. I will be using PyCharm to build this application.
Let’s start by opening up a terminal and creating a folder that will house both the application folder and the virtual environment folder. I have named my folder “orgdev.”
Mac Terminal Image
Now, navigate to orgdev and let us execute this command “virtualenv orgdevenvironment -p python3”, no quotes. This command will create a silo’d environment to work with our code. Also, if you have not created your application folder, go ahead and create that now. So far, my structure looks like this:
Folder Structure for Virtualenv
Now its time to activate our virtual environment and create the flask application. I will list the next steps in order, so we can quickly get to starting the application.
- To activate your environment navigate to your environment folder and type in your terminal:
- source bin/activate
- Navigate to your application folder and create a directory titled “app”
- In the same directory, create a file named run.py (you can name it however you like)