用于PyPi的JSON API-如何列出软件包? [英] JSON API for PyPi - how to list packages?

查看:85
本文介绍了用于PyPi的JSON API-如何列出软件包?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有一个用于PyPI的JSON API ,该API允许获取包数据:

There is a JSON API for PyPI which allows getting data for packages:

http://pypi.python.org/pypi/<package_name>/json
http://pypi.python.org/pypi/<package_name>/<version>/json

但是,是否可以通过GET调用获取所有PyPI软件包(或最新软件包)的列表?

However, is it possible to get a list of all PyPI packages (or, for example, recent ones) with a GET call?

推荐答案

最简单的方法是使用 PyPI上的简单索引,其中列出了所有没有开销的软件包.然后,您可以通过对问题中提到的URL执行GET请求来分别请求每个程序包的JSON.

The easiest way to do this is to use the simple index at PyPI which lists all packages without overhead. You can then request the JSON of each package individually by performing a GET request to the URLs mentioned in your question.

这篇关于用于PyPi的JSON API-如何列出软件包?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆