https://github.com/barandev/list-repositories-using-github-api-template
This is a template repository for creating a Flask web application that fetches and displays GitHub user repositories using the GitHub API.
https://github.com/barandev/list-repositories-using-github-api-template
css flask githubapi html javascript python restapi webdevelopment
Last synced: 10 months ago
JSON representation
This is a template repository for creating a Flask web application that fetches and displays GitHub user repositories using the GitHub API.
- Host: GitHub
- URL: https://github.com/barandev/list-repositories-using-github-api-template
- Owner: BaranDev
- License: mit
- Created: 2024-02-28T22:59:51.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-04-04T09:15:59.000Z (over 1 year ago)
- Last Synced: 2024-04-04T10:30:51.405Z (over 1 year ago)
- Topics: css, flask, githubapi, html, javascript, python, restapi, webdevelopment
- Language: HTML
- Homepage:
- Size: 8.79 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
### Directions:
1. **Setting up GitHub API Token:**
- Make sure you have a GitHub API token. You can obtain one by following [GitHub's instructions](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token).
- Once you have the token, create a `.env` file in the root directory of your project.
- Inside the `.env` file, edit the following line:
```
GITHUB_API_TOKEN="your_github_api_key"
```
2. **Dependencies:**
- Make sure to install the required dependencies by running:
```
pip install -r requirements.txt
```
3. **Running the Application:**
- Execute the script by running:
```
python main.py
```
- This will start the Flask application on `http://127.0.0.1:8080/`.
4. **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.
### Additional Information:
- The application uses Flask to create a web server.
- It fetches the repositories of a GitHub user using the GitHub API.
- The `fetch_repositories` function 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.


[](https://github.com/barandev/List-Repositories-using-GitHub-API-Template/blob/main/LICENSE)
[](https://github.com/barandev/List-Repositories-using-GitHub-API-Template/issues)
[](https://github.com/barandev/List-Repositories-using-GitHub-API-Template/pulls)
[](https://github.com/barandev/List-Repositories-using-GitHub-API-Template/stargazers)
[](https://github.com/barandev/List-Repositories-using-GitHub-API-Template/network)
### Created With [Lazy.AI](https://www.getlazy.ai)