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

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

问题描述

有一个 用于 PyPI 的 JSON 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天全站免登陆