What are de IP ranges for connecting to Pypi.org

PyPI utilizes the Fastly CDN (courtesy of a generous and
much-appreciated donation). Fastly has a knowledge base article
which seems to address your question:

Hope that helps!