Skip to content

Instantly share code, notes, and snippets.

View slapslash's full-sized avatar
🍩

Sven Lange slapslash

🍩
View GitHub Profile
@slapslash
slapslash / random_pypi.py
Last active January 20, 2022 11:43
Get a random selection from the top 5000 PyPI packages and show a short summary of them.
import random
import requests
# will be updated monthly.
top_url = "https://hugovk.github.io/top-pypi-packages/top-pypi-packages-30-days.min.json"
data = requests.get(top_url).json()
packs = [d["project"] for d in data["rows"]]
for _ in range(3):