Skip to main content

Clone GitHub Repo

Below are the instructions for cloning the project, if you wish to construct the project from scratch you can skip this step.

Proceed to the Devii GitHub page, then find the repository devii_python_tutorial, click on the repository name to open the project and clone or fork the project.

Clone Project

When landing on the Devii Python-flask tutorial page click on the green "Code" button then click on the copy button (above the red arrow)

Git Hub Clone Button

If you are using Visual Studio Code simply open a new window and either click on the Clone Git Repository or open the Command Palette and enter Git: Clone then paste the URL address you copied and select/save in your preferred directory, once the project is cloned you can either open in your current window or open a new window.

Next, create a python virtual environment, this will isolate project dependencies and avoid conflicts with other projects.

Run the following command to create a virtual environment named "venv" (OS agnostic):

python3 -m venv venv

If running Windows run this command to activate your venv:

venv\Scripts\activate

if running MacOS or Linux run this command to activate your venv:

source venv/bin/activate

then run

pip install -r requirements.txt

finally to run the project

Windows:

python app.py

Linux:

flask run

The app should be running on your local server http://127.0.0.1:5000, and should direct you to the index page where you can either choose login or sign up, either option will require your tenantid which you can retrieve your devii tenantid from the dashboard card in the portal.