CLI application that fetches an ddisplays the recent activity of a specified GitHub user
Project description
GitHub User Activity CLI
This is a simple Python-based CLI application that fetches and displays the recent activity
of a specified GitHub user. This project is part of
roadmap.sh's GitHub User Activity Project,
and the goal of this program is to practice making HTTP requests and using Python modules like
requests , while also getting familiar with match cases for handling different types of events.
Features
- Fetches recent activity of a GitHub user using the GitHub Events API.
- Displays events such as push commits, opened issues, starred repositories, and more.
- Validates that a GitHub username is provided and that the user exists.
- Option to specify a limit on the number of recent events to display.
- Error handling, including missing username, user not found and API error scenarios.
Installation
-
Clone the repository:
git clone git@github.com:ehdlg/github-user-activity.git
-
Navigate to the project directory:
cd github-user-activity
-
Install the dependencies: Make sure you have pip installed and then run:
pip install -r requirements.txt
Usage
To run the application, use the following command:
python main.py <username> [filter]
Where:
- < username >: The GitHub username for which you want to fetch recent activity.
- [filter] (optional): A filter to specify the number of events to display. If not provided, the last 30 events will be shown.
Examples
-
Display recent activity of a user without a limit:
python main.py example_user
-
Display the first 10 recent events of a user:
python main.py example_user 10
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file github_user_activity_ehdlg-1.0.0.tar.gz.
File metadata
- Download URL: github_user_activity_ehdlg-1.0.0.tar.gz
- Upload date:
- Size: 3.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.1.dev0+g94f810c.d20240510 CPython/3.12.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ba5c2b4583cf3832a1492cf17efbff598cbf0d0bc1d09627c95091f41f406ed2
|
|
| MD5 |
4ef4e6fcd24978fdc3bec9f81e3da382
|
|
| BLAKE2b-256 |
791de5e4823310fa03f93b7117f3020c58c4ba75415b361202d60441ea1f3968
|
File details
Details for the file github_user_activity_ehdlg-1.0.0-py3-none-any.whl.
File metadata
- Download URL: github_user_activity_ehdlg-1.0.0-py3-none-any.whl
- Upload date:
- Size: 3.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.1.dev0+g94f810c.d20240510 CPython/3.12.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8570fabb408f2bf19802e6c2e9b3af7909206c03d8132183bfae3641246726b0
|
|
| MD5 |
b8d2b63e693808a71c3cbaf257e6a457
|
|
| BLAKE2b-256 |
62a5b40b4feb52c67956fdadb17ace11cdb8fc478eb64f2307b532b6cf894c5f
|