feat: Print source used in get_total_downloads function

This commit is contained in:
Paul Gauthier (aider) 2025-03-21 09:01:50 -07:00
parent 2069ad62d1
commit e31be8d3c9

View file

@ -79,9 +79,11 @@ def get_total_downloads(
Otherwise uses pepy.tech API (requires api_key).
"""
if use_bigquery:
print(f"Using BigQuery to fetch download statistics for {package_name}")
return get_downloads_from_bigquery(credentials_path, package_name)
# Fall back to pepy.tech API
print(f"Using pepy.tech API to fetch download statistics for {package_name}")
if not api_key:
print("API key not provided for pepy.tech", file=sys.stderr)
sys.exit(1)