Modules for interacting with GitHub API.
Project description
The best way to interact with GitHub API.
Note: This module is useful for the GitHub API
Your URL should look like this https://api.github.com This is working module with your PAT Token
Prerequisites
from github_module import GitHubHelper
Getting Started
Connectivity to GitHub
To initialize a connection to GitHub, instantiate the GitHubHelper
class with your GitHub URL, ORG, and Personal API Token:
github_helper = GitHubHelper(GITHUB_API, API_TOKEN)
1. Check existing remaining API calls
- Fetch existing remaining API calls
from github_module import GitHubHelper
github_api = "https://api.github.com"
access_token = "<your_token>"
github_helper = GitHubHelper(github_api, access_token)
rate_limit_remaining = github_helper.get_rate_limit()
if rate_limit_remaining is not False:
print(f"Remaining GitHub API rate limit: {rate_limit_remaining}")
else:
print("Failed to fetch the rate limit.")
Data Privacy Note
🔒 We respect your privacy: This module does not store any of your data anywhere. It simply interacts with the GitHub API to perform the requested operations. Ensure you manage your connection details securely.
Release Notes
Latest Release: 0.1 (05 Aug 2024)
- Get your current rate limit
- Use the function
get_rate_limit
to check your existing remaining rate limit for your token - Imp Note: Your rate limit is associated with your account. Not with per PAT Token
- Use the function
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
github_module-0.1.tar.gz
(2.3 kB
view hashes)
Built Distribution
Close
Hashes for github_module-0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 96c84c7a0d79b52e21cc729fa189d9f6cd5b9465fdbe3439688fad1f89d3c5cf |
|
MD5 | 8e34ecc848afb227292cfa19a78584a3 |
|
BLAKE2b-256 | 1c202e51bb859cd4d9c6295e2ad552ca51fd4df8b899f9f68a4be6f368587eb2 |