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.3.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.3-py3-none-any.whl (18.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: gh_parser-1.0.3.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.3.tar.gz
Algorithm Hash digest
SHA256 1200137c3c383b9ea8e988a4cb2cd01f8d7b7a8bcec25ce84c977b347a689727
MD5 42b01da8852ff2edf287ea69e59d23f4
BLAKE2b-256 47cf85a01ebb85b80b662c9e010ffb62f7ae5285cd67506535c0d765e83e577a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: gh_parser-1.0.3-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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 623cc2aa8f7fa249f4d548a875b5b498641dbcbb01045b95112ef16de5691efc
MD5 f154d5c230476b3ea43a785a0d1fbeb1
BLAKE2b-256 1c813f66528babd3455563067041b3d32d38f5cf06c15680ea9f83b56eae9d14

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