Setting up the development environment

Before we start writing the code for our application, we need to have some dependencies in place. So, let's build the environment and then move on to writing the code that will power our application.

As a first step, let's create a directory that will contain all the files related to our project. Let's call this folder github_demo. The following command gets the folder in place for us:

mkdir github_demo

Once we have the directory setup done, let's move into the directory and set up a few things:

cd github_demo

Once this is done, we can now set up our project. Before we start writing the code, let's get the virtual environment setup done, which will help us to keep our project dependencies segregated. The following command creates the virtual environment for us:

virtualenv –python=python3 venv

The next step is to activate the virtual environment and set up the required dependencies. The following command will get the virtual environment ready for use:

source venv/bin/activate

Once this is done, let's install our dependency. For our demo application, we will be using the PyGithub library available through pip. To get the dependency installed, all we need to do is execute the next command:

pip install pygithub

With our dependencies installed, we are now ready to build our application.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.12.76.164