You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
swarms/check_sizes.sh

17 lines
503 B

#!/bin/bash
total_size=0
while read -r package; do
# Fetch package info from PyPI
size=$(curl -s "https://pypi.org/pypi/$package/json" | jq '.releases | to_entries | map(.value[].size) | add')
if [ "$size" != "null" ]; then
echo "$package: $(echo "scale=2; $size/1024/1024" | bc) MB"
total_size=$(echo "$total_size + $size" | bc)
else
echo "$package: Not found"
fi
done <requirements.txt
echo "Total size: $(echo "scale=2; $total_size/1024/1024" | bc) MB"