Skip to content

freedevgraph/github-api-python-project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GitHub API Python Project

This is a simple Python project that demonstrates how to interact with the GitHub API using the PyGithub library.

Features

  • Authenticates with a GitHub Personal Access Token.
  • Lists all repositories accessible by the authenticated user.

Setup

  1. Clone the repository:

    git clone https://github.com/freedevgraph/github-api-python-project.git
    cd github-api-python-project
  2. Install dependencies:

    pip install -r requirements.txt
  3. Set up your GitHub Personal Access Token: The script expects your GitHub Personal Access Token to be set as an environment variable named GH_TOKEN. You can generate a new token here. Make sure the token has at least repo scope to list private repositories.

    export GH_TOKEN="YOUR_GITHUB_TOKEN"
  4. Run the script:

    python main.py

Usage

Upon running the script, it will print the login of the authenticated user and then list the names of all repositories associated with that user.

Contributing

Feel free to fork this repository, make improvements, and submit pull requests.

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages