Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

List of PyPI classifiers

I can get a list of trove classifiers like this:

>>> import requests
>>> response = requests.get('https://pypi.python.org/pypi', params={':action': 'list_classifiers'})
>>> classifiers = response.text.splitlines()
>>> len(classifiers)
649
>>> classifiers[:5]
['Development Status :: 1 - Planning',
 'Development Status :: 2 - Pre-Alpha',
 'Development Status :: 3 - Alpha',
 'Development Status :: 4 - Beta',
 'Development Status :: 5 - Production/Stable']

Is there any way to get this list without using network access? For example, does the list exist in distutils or something? Where is the source of truth?

like image 910
wim Avatar asked Oct 31 '25 14:10

wim


2 Answers

The source of truth is at PyPI only. Initially the list of classifiers was in trove.py, but later moved to SQL.

like image 139
phd Avatar answered Nov 02 '25 04:11

phd


Per @phd's answer, PyPI has the source of truth for trove classifiers. To add on, however, the package trove-classifers can list and confirm that a classifier exists.1 2 Said package is maintained by the Python Package Authority0, and should be accurate.

like image 42
Tomodachi94 Avatar answered Nov 02 '25 03:11

Tomodachi94