
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를 실행하세요.
Python 프로젝트에서 octosuite 사용하기:
from octosuite import User, Repo, Org, Search
# 사용자 데이터 가져오기
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)
# 저장소 데이터 가져오기
repo = Repo(name="linux", owner="torvalds")
exists, profile = repo.exists()
if exists:
commits = repo.commits(page=1, per_page=100)
languages = repo.languages()
# 조직 데이터 가져오기
org = Org("github")
exists, profile = org.exists()
if exists:
members = org.members(page=1, per_page=100)
# GitHub 검색
search = Search(query="machine learning", page=1, per_page=50)
results = search.repos()
사용자: 프로필, 저장소, 구독, 별표, 팔로워, 팔로잉, 조직, Gist, 이벤트, 수신 이벤트
저장소: 프로필, 포크, 이슈 이벤트, 이벤트, 담당자, 브랜치, 태그, 언어, 스타게이저, 구독자, 커밋, 댓글, 이슈, 릴리스, 배포, 레이블
조직: 프로필, 저장소, 이벤트, 훅, 이슈, 멤버
검색: 저장소, 사용자, 커밋, 이슈, 토픽
MIT 라이선스. 자세한 내용은 LICENCE 파일을 참조하세요.