JSON API for PyPi - how to list packages?

前端 未结 4 2161
后悔当初
后悔当初 2020-12-15 18:33

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

http://pypi.python.org/pypi//json
http://pypi.python.org/pypi/

        
4条回答
  •  清歌不尽
    2020-12-15 19:10

    Here's Bash one-liner:

    curl -sG -H 'Host: pypi.org' -H 'Accept: application/json' https://pypi.org/pypi/numpy/json | awk -F "description\":\"" '{ print $2 }' |cut -d ',' -f 1
    
    # NumPy is a general-purpose array-processing package designed to...
    

提交回复
热议问题