Lightweight Python client for GitHub's public API. Get user profiles, repos, and activity without authentication.
from github_api import GitHubClient client = GitHubClient() # User profile user = client.user("torvalds") print(f"{user['name']} — {user['public_repos']} repos, {user['followers']} followers") # User's repos (sorted by stars) repos = client.repos("torvalds", sort="stars") for r in repos[:5]: print(f" {r['name']} — {r['stars']} stars, {r['language']}") # Search repos results = client.search_repos("machine learning python", sort="stars") for r in results[:5]: print(f" {r['full_name']} — {r['stars']} stars") # Trending topics topics = client.search_topics("web scraping") for t in topics[:5]: print(f" {t['name']} — {t['description'][:60]}")
- User profiles — bio, repos count, followers, company, location
- Repository listing — filter by language, sort by stars/updated
- Search — repos, users, topics, code (with auth)
- No API key for basic use — 60 requests/hour unauthenticated
- Optional auth — pass token for 5,000 requests/hour
| Method | Description | Auth Required |
|---|---|---|
user(username) |
Get user profile | No |
repos(username, sort, direction) |
List user repos | No |
repo(owner, name) |
Get repo details | No |
search_repos(query, sort, order) |
Search repositories | No |
search_users(query, sort) |
Search users | No |
search_topics(query) |
Search topics | No |
- Without token: 60 requests/hour (good for scripts)
- With token: 5,000 requests/hour
# With authentication client = GitHubClient(token="ghp_your_token_here")
- awesome-no-auth-apis — 50+ free APIs
- hacker-news-python — HN data
- python-data-fetcher — Multi-source data
MIT
I build production-ready scrapers, APIs, and data tools — 78+ deployed on Apify, 270+ open-source repos.
📧 spinov001@gmail.com — 250ドル flat rate, 48h delivery. Describe your project, get a free estimate in 2 hours.