
Терминальный набор инструментов для анализа данных 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 напрямую из командной строки:
# Данные пользователя
octosuite user torvalds
octosuite user torvalds --repos --page 1 --per-page 50
octosuite user torvalds --followers --json
# Данные репозитория
octosuite repo torvalds/linux
octosuite repo torvalds/linux --commits
octosuite repo torvalds/linux --stargazers --export ./data
# Данные организации
octosuite org github
octosuite org github --members --json
# Поиск
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()
Пользователь: profile, repos, subscriptions, starred, followers, following, orgs, gists, events, received_events
Репозиторий: profile, forks, issue_events, events, assignees, branches, tags, languages, stargazers, subscribers, commits, comments, issues, releases, deployments, labels
Организация: profile, repos, events, hooks, issues, members
Поиск: repos, users, commits, issues, topics
Лицензия MIT. Подробнее см. в файле LICENCE.