-
Setting up GitHub API Token:
- Make sure you have a GitHub API token. You can obtain one by following GitHub's instructions.
- Once you have the token, create a
.envfile in the root directory of your project. - Inside the
.envfile, edit the following line:GITHUB_API_TOKEN="your_github_api_key"
-
Dependencies:
- Make sure to install the required dependencies by running:
pip install -r requirements.txt
- Make sure to install the required dependencies by running:
-
Running the Application:
- Execute the script by running:
python main.py - This will start the Flask application on
http://127.0.0.1:8080/.
- Execute the script by running:
-
Using the Application:
- Navigate to
http://127.0.0.1:8080/in your web browser. - Enter a GitHub username and submit the form.
- The application will fetch and display the repositories of the entered GitHub user.
- Navigate to
- The application uses Flask to create a web server.
- It fetches the repositories of a GitHub user using the GitHub API.
- The
fetch_repositoriesfunction sends a request to the GitHub API with the provided username and API token. - The fetched repository data is then passed to the HTML template for rendering.