Skip to main content

A package for parsing GitHub API.

Project description

GitHubParser

GitHubParser is a Python package designed to interact with the GitHub API, providing a suite of tools to fetch and parse data from GitHub repositories. It simplifies the process of accessing repository statistics, contents, and metadata, making it easier for developers to integrate GitHub data into their applications.

Features

  • Fetch Repository Statistics: Retrieve detailed statistics for any GitHub repository.

  • Access Repository Contents: Get the contents of specific paths within a repository.

  • List All Repositories: Fetch all repositories for a given GitHub user.

  • Rate Limit Information: Check the current rate limit status of the GitHub API.

  • Configuration File Parsing: Parse configuration files to retrieve GitHub API credentials and other settings.

  • Customizable Parsing: Supports custom parsing of URLs and APIs.

Installation

You can install GitHubParser using pip:

pip install gh-parser

Usage

To use GitHubParser, you need to create an instance of the GitHubParser class and provide your GitHub API credentials. You can then use the various methods provided by the class to fetch and parse data from GitHub repositories.

Here's an example of how you can use GitHubParser to fetch statistics for a GitHub repository:

from gh_parser import GitHubParser

# Create an instance of GitHubParser
parser = GitHubParser(username='your_username', token='your_token')
# Alternatively, you can provide your credentials in a configuration file
parser = GitHubParser(config_file='config.ini')

# Fetch API Information
main_page = parser.get_main_page()

repostats = parser.full_stats

all_repos = parser.all_repos

all_repopaths = parser.all_repopaths

# Alternatively, you can use the custom functions to fetch specific data
from gh_parser import get_repo_stats, get_repo_contents,
get_all_repos, get_rate_limit

# Fetch repository statistics
repo_stats = get_repo_stats(config_file='config.ini')

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gh_parser-1.0.2.tar.gz (17.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gh_parser-1.0.2-py3-none-any.whl (18.7 kB view details)

Uploaded Python 3

File details

Details for the file gh_parser-1.0.2.tar.gz.

File metadata

  • Download URL: gh_parser-1.0.2.tar.gz
  • Upload date:
  • Size: 17.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.0

File hashes

Hashes for gh_parser-1.0.2.tar.gz
Algorithm Hash digest
SHA256 6eebab5379c2406301e0fff3186f001c390cfc781b2e34b936f1ce0834c83026
MD5 c891a0d2aeb12e3d9d8646de16395a4d
BLAKE2b-256 ac13900e4ee365e6670367b7600b46349cecf705be312b26e475e27a1ebf847f

See more details on using hashes here.

File details

Details for the file gh_parser-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: gh_parser-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 18.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.0

File hashes

Hashes for gh_parser-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 5cc7d21365eaf5b2e8ab31b4aff945de3d71dab869facf51050a3d8b1b48a3b9
MD5 b179fd9fab65ae775d034183514a2aa3
BLAKE2b-256 deeaf7e30be9b9f4c021d164a0159a4b7faa80a0c892cc3d9937bcbc7a3a30d6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page