This is a Proof-of-Concept (PoC) Django project that ranks open source packages based on multiple metrics like downloads, GitHub stars, contributors, release activity, and more.
- Dynamic scoring algorithm using:
- Total downloads
- Weekly downloads
- GitHub stars
- Contributors and contributions
- Days since last release
- Scores calculated using log-scaling and decay for older packages
- Clean, responsive UI with Bootstrap
- Local database with randomly generated sample data > Github and Package Manger APIs
The package score is calculated with the following logic:
# NORMALIZED SCORE COMPONENTS
s_downloads = w_total_downloads * safe_log(self.total_downloads)
s_weekly = w_weekly_downloads * safe_log(self.weekly_downloads)
s_stars = w_stars * safe_log(self.stars)
s_contributors = w_contributors * safe_log(self.contributors)
s_contributions = w_contributions * safe_log(self.contributions)
# Older packages get lower scores (Activity Decay)
s_decay = w_release_decay * (1 / (1 + self.days_since_last_release))
# Recent release boost
s_fresh = w_freshness_boost * (100 / (1 + self.days_since_last_release))
self.score = round(
s_downloads +
s_weekly +
s_stars +
s_contributors +
s_contributions +
s_decay +
s_fresh, 2
)
Weights (w1 to w6) are customizable in models.py.
git clone https://github.com/yourusername/package-rank.git
cd package-rankpython3 -m venv venv
source venv/bin/activate # on Windows: venv\Scripts\activatepip install djangopython manage.py makemigrations
python manage.py migratepython manage.py populate_packagespython manage.py runserverVisit http://127.0.0.1:8000/ in your browser to view the PoC.
