ghtopdep
raw JSON → 0.4.3 verified Sat May 09 auth: no python maintenance
A CLI tool to list and sort GitHub dependent repositories and packages by star count, helping to identify the most popular dependents of a given repository or package. Version 0.4.3, last release in 2023, stable with low maintenance.
pip install ghtopdep Common errors
error ImportError: cannot import name 'ghtopdep' from 'ghtopdep' ↓
cause Trying to import the function incorrectly; the correct import is 'from ghtopdep import ghtopdep'.
fix
Use: from ghtopdep import ghtopdep
error Error: Invalid value for '--repo': 'invalid/repo' ↓
cause The repository format must be 'owner/repo' or full URL.
fix
Use correct format: 'owner/repo' (e.g., 'tensorflow/tensorflow')
error rate limit exceeded (403) ↓
cause Hit GitHub API rate limit without authentication.
fix
Set GITHUB_TOKEN environment variable with a personal access token to increase rate limit.
Warnings
gotcha The output includes both repositories and packages (PyPI, npm) by default, which may mix GitHub repos with package registries. Use '--type repo' or '--type package' to filter. ↓
fix Add '--type repo' to limit to GitHub repositories.
deprecated The library previously had a different CLI entry point (ghtopdep as a module) but now recommends using the 'ghtopdep' command directly in terminal. Calling as a Python function is not officially documented. ↓
fix Use the command-line tool: 'ghtopdep --repo tensorflow/tensorflow'
gotcha GitHub API rate limits can cause failures for large queries. The tool does not have built-in authentication token support; you must set GH_TOKEN environment variable manually. ↓
fix Export GITHUB_TOKEN or GA_TOKEN environment variable with a GitHub personal access token before running.
Imports
- ghtopdep wrong
import ghtopdepcorrectfrom ghtopdep import ghtopdep
Quickstart
from ghtopdep import ghtopdep
ghtopdep.main(['--repo', 'tensorflow/tensorflow', '--limit', '5'])