
أداة طرفية لتحليل بيانات GitHub.

مجموعة أدوات تعمل في الطرفية لتحليل بيانات GitHub.
$ octosuite user torvalds
from pprint import pprint
import octosuite
user = octosuite.User(name="torvalds")
exists, profile = user.exists()
if exists:
pprint(profile)
pip install octosuite
قم بتشغيل الواجهة التفاعلية في الطرفية:
octosuite -t/--tui
تنقل باستخدام مفاتيح الأسهم و Enter لتحديد الخيارات.
استعلم عن بيانات GitHub مباشرة من سطر الأوامر:
# User data
octosuite user torvalds
octosuite user torvalds --repos --page 1 --per-page 50
octosuite user torvalds --followers --json
# Repository data
octosuite repo torvalds/linux
octosuite repo torvalds/linux --commits
octosuite repo torvalds/linux --stargazers --export ./data
# Organisation data
octosuite org github
octosuite org github --members --json
# Search
octosuite search "machine learning" --repos
octosuite search "python cli" --users --json
خيارات شائعة:
--page - رقم الصفحة (الافتراضي: 1)--per-page - النتائج لكل صفحة، الحد الأقصى 100 (الافتراضي: 100)--json - الإخراج بصيغة JSON--export DIR - التصدير إلى مجلدقم بتشغيل octosuite <command> --help لعرض علامات أنواع البيانات المتاحة.
استخدم octosuite في مشاريع Python الخاصة بك:
from octosuite import User, Repo, Org, Search
# Get user data
user = User("torvalds")
exists, profile = user.exists()
if exists:
repos = user.repos(page=1, per_page=100)
followers = user.followers(page=1, per_page=50)
# Get repository data
repo = Repo(name="linux", owner="torvalds")
exists, profile = repo.exists()
if exists:
commits = repo.commits(page=1, per_page=100)
languages = repo.languages()
# Get organisation data
org = Org("github")
exists, profile = org.exists()
if exists:
members = org.members(page=1, per_page=100)
# Search GitHub
search = Search(query="machine learning", page=1, per_page=50)
results = search.repos()
User: profile, repos, subscriptions, starred, followers, following, orgs, gists, events, received_events
Repository: profile, forks, issue_events, events, assignees, branches, tags, languages, stargazers, subscribers, commits, comments, issues, releases, deployments, labels
Organisation: profile, repos, events, hooks, issues, members
Search: repos, users, commits, issues, topics
رخصة MIT. راجع ملف الرخصة للتفاصيل.