https://github.com/sshehrozali/get-github-repo
Python program to access all the contents of a GitHub repository provided by username
https://github.com/sshehrozali/get-github-repo
automation git github github-api github-api-v3 github-repos python python3 requests
Last synced: 12 months ago
JSON representation
Python program to access all the contents of a GitHub repository provided by username
- Host: GitHub
- URL: https://github.com/sshehrozali/get-github-repo
- Owner: sshehrozali
- Created: 2020-08-19T08:28:43.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-08-20T19:20:54.000Z (over 5 years ago)
- Last Synced: 2025-02-03T09:46:58.034Z (about 1 year ago)
- Topics: automation, git, github, github-api, github-api-v3, github-repos, python, python3, requests
- Language: Python
- Homepage:
- Size: 16.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Get-GitHub-Repo
NOTE
The program is designed for unauthenticated user without using username and password or GitHub ACCESS TOKENS.So chances
are returning reponses could be limited [if not within range 30]
What is Automation?
A little background
Sometimes we just need to stop typing on the keyboard, hold a cup of coffee in hands,sit back and let the computer automate all the
tasks on its own to get the most accurate search results so that we can quickly wind-up other things and move onto next task.
At this point a term called Automation comes handy which takes the burden of all the recursive steps and produces the desired
output without human interference.
But Why?
Today, where hundreds of millions and billions of information and data are updated at every notch of a second (almost) and thousands of
requests are made by millions of people regularly so it becomes super difiicult to manage,manipulate,search and update data of a
particular search filter and qualifier.That's why Automation makes computer handle the recursive steps
and keep querying the results until a break or base condition is met.Similarly in the world of Git and GitHub, automated scripts
and programs can be super useful to manage and search repos and projects.
Description
Let's suppose you have to get all the contents of hello-world repository of user: hellocat.So basically there are two ways
to approach this problem:
- First one is old traditional method of opening your browser first.Head to the URL address bar.Type github.com/user_name.
Get to the homepage.Go to repositories.Then keep scrolling your mouse down until you find your desired repo and then click
on it to open its content. - Second one is super fast and intelligent.You run my Python program.You just type username of a person and boom
you are done, all the repositories of that username along with info and data are printed on your screen.Then you
just type the correct repo_no to access and see all the contents of that repo along with URL.Well, pretty nice
huh?
How my program works?
Well, its pretty nice and decent.You can open the .py code and read the comments so that you can understand on your own.
The program uses REST API and GitHub API to access all the public ids and repositories so that you can access the
contents.A simple request is made to get the repo data of input: username and then correct repo_no is used
to pass repo_name to function which again make request and stores JSON response in the form of list.