Skip to content

spinov001-art/github-api-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

github-api-python 🐙

Lightweight Python client for GitHub's public API. Get user profiles, repos, and activity without authentication.

Quick Start

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]}")

Features

  • 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

API Reference

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

Rate Limits

  • Without token: 60 requests/hour (good for scripts)
  • With token: 5,000 requests/hour
# With authentication
client = GitHubClient(token="ghp_your_token_here")

Related Projects

License

MIT


Need a Custom Tool Built?

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.

🔧 Browse 78+ ready-made tools on Apify →

About

Lightweight Python client for GitHub API — user profiles, repos, search. No auth needed for basic use.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages