Skip to content

Instantly share code, notes, and snippets.

Avatar

Harisankar Krishna Swamy harisankar-krishna-swamy

View GitHub Profile
@harisankar-krishna-swamy
harisankar-krishna-swamy / py_package_download.sh
Last active May 28, 2021
Create your own Python package repository with 4000 of most used Python package's.whl and .tar,gz (multiple versions support)
View py_package_download.sh
#!/bin/bash
# Script creates a simple repository like pypi in a folder named 'packages'. packages will contain a folder for each Python package/project
# that is in top downloaded in last 365 days (credits @hugovk.github,io). Each package's folder will contain .whl and .tar.gz
# of the package's 4 latest version as applicable. Steps:
# 1. Signup and get API key as mentioned in https://pypi.org/help/#apitoken
# 2. Copy this script into a folder and run as
# parallel --jobs 5 --eta ./py_packge_download.sh :::: <(curl https://hugovk.github.io/top-pypi-packages/top-pypi-packages-365-days.json | grep project | cut -d ':' -f 2 | tr -s ' "' ' ')
# 3. Once finished run an https/http server on packages and use it in pip as
# 4. "pip install --index-url https://yourl_local_pypi_host:port python_package_name"