Run the fetch script to generate initial data:
python fetch_stats.pyThis creates docs/data/stats.json with the latest statistics.
- Go to your repository settings on GitHub
- Navigate to Settings > Pages
- Under Source, select Deploy from a branch
- Choose the main branch and /docs folder
- Click Save
Your dashboard will be available at: https://[username].github.io/[repository-name]/
The GitHub Actions workflow (.github/workflows/update-stats.yml) automatically:
- Runs daily at midnight UTC
- Fetches latest stats from pypistats.org API
- Commits updated data if changes detected
- Can be manually triggered from the Actions tab
To manually update the statistics:
# Run the fetch script
python fetch_stats.py
# Commit and push
git add docs/data/stats.json
git commit -m "Update PyPI stats"
git pushOr use the Actions tab on GitHub to trigger the workflow manually.
.
├── .github/
│ └── workflows/
│ └── update-stats.yml # GitHub Actions workflow
├── docs/ # GitHub Pages content
│ ├── index.html # Dashboard HTML
│ ├── css/
│ │ └── style.css # Dashboard styles
│ ├── js/
│ │ └── dashboard.js # Dashboard JavaScript
│ └── data/
│ └── stats.json # PyPI statistics (auto-generated)
├── fetch_stats.py # Stats fetching script
├── INSTRUCTIONS.md # Setup and customization guide
└── README.md
Edit the PACKAGES list in fetch_stats.py:
PACKAGES = [
"purl2src",
"your-new-package",
# ...
]Edit the cron schedule in .github/workflows/update-stats.yml:
schedule:
- cron: '0 0 * * *' # Daily at midnight UTC
# - cron: '0 */6 * * *' # Every 6 hours
# - cron: '0 0 * * 0' # Weekly on SundayModify docs/css/style.css to customize colors, fonts, and layout.
All data is fetched from pypistats.org API:
- No API key required
- Rate limiting applied
- Data updated daily
- Historical data retained for 180 days