A Python script that fetches and displays the top Jupyter Notebook repositories from GitHub using the GitHub API.
- Python 3.10 or higher
- uv package manager
-
Clone or download this repository
git clone <repository-url> cd githublanguages
-
Install dependencies using uv
uv sync
This will:
- Create a virtual environment
- Install all required dependencies from
pyproject.toml - Generate a
uv.lockfile for reproducible builds
For better rate limits and to avoid hitting GitHub's API limits, create a GitHub Personal Access Token:
- Go to GitHub Settings > Personal Access Tokens
- Click "Generate new token (classic)"
- Select scopes:
public_repo(for public repositories) - Copy the generated token
Create a .env file in the project root:
cp .env_template .envEdit .env and add your token:
GITHUB_TOKEN=your_github_token_here
Note: Without a token, the script will work but with lower rate limits (60 requests/hour vs 5000 requests/hour).
uv run script.pyThis command will:
- Activate the virtual environment
- Run the script with all dependencies available
- Display the top 20 Jupyter Notebook repositories
# Activate the virtual environment
source .venv/bin/activate # On Unix/macOS
# or
.venv\Scripts\activate # On Windows
# Run the script
python script.py