Trove Classifiers
raw JSON → 2026.1.14.14 verified Tue May 12 auth: no python install: verified quickstart: verified
Provides the canonical set of classifiers for PyPI, enabling validation and categorization of Python projects. Current version: 2026.1.14.14. Maintained with regular updates to reflect the latest standards and additions in Python packaging.
pip install trove-classifiers Common errors
error ModuleNotFoundError: No module named 'trove_classifiers' ↓
cause The 'trove-classifiers' package is not installed in the current Python environment.
fix
pip install trove-classifiers
error ImportError: cannot import name 'Classifier' from 'trove_classifiers' ↓
cause The 'trove_classifiers' library does not expose a class or object named 'Classifier' for direct import; classifiers are typically handled as strings or accessed via provided functions and data structures.
fix
Use
trove_classifiers.list_classifiers() to get all classifiers or trove_classifiers.is_valid_classifier() to check a specific classifier string. error AttributeError: module 'trove_classifiers' has no attribute 'validate_classifier' ↓
cause The 'trove_classifiers' module does not have an attribute or function named 'validate_classifier'; the correct function for validation is 'is_valid_classifier'.
fix
Use
trove_classifiers.is_valid_classifier(classifier_string) to check if a classifier is valid. error TypeError: expected string, int found ↓
cause The `trove_classifiers.is_valid_classifier()` function expects a string argument representing the classifier, but received an integer or other non-string type.
fix
Ensure the argument passed to
trove_classifiers.is_valid_classifier() is a string, for example: trove_classifiers.is_valid_classifier("Programming Language :: Python :: 3.9"). Warnings
breaking The 'deprecated_classifiers' dictionary may change in future versions, potentially affecting code that relies on specific deprecated classifiers. ↓
fix Regularly review the 'deprecated_classifiers' dictionary to ensure compatibility with future versions.
gotcha Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead. ↓
fix Use a virtual environment instead: https://pip.pypa.io/warnings/venv
breaking Running pip as the 'root' user can result in broken permissions and conflicting behavior with the system package manager, potentially rendering your system unusable. It is recommended to use a virtual environment instead. ↓
fix Use a virtual environment for package management. If running as root is necessary, use the '--root-user-action' option to suppress this warning after understanding the implications.
Install compatibility verified last tested: 2026-05-12
python os / libc status wheel install import disk
3.10 alpine (musl) - - 0.01s 17.9M
3.10 slim (glibc) - - 0.00s 18M
3.11 alpine (musl) - - 0.02s 19.7M
3.11 slim (glibc) - - 0.01s 20M
3.12 alpine (musl) - - 0.02s 11.6M
3.12 slim (glibc) - - 0.01s 12M
3.13 alpine (musl) - - 0.01s 11.2M
3.13 slim (glibc) - - 0.01s 12M
3.9 alpine (musl) - - 0.01s 17.4M
3.9 slim (glibc) - - 0.01s 18M
Imports
- classifiers
from trove_classifiers import classifiers - deprecated_classifiers
from trove_classifiers import deprecated_classifiers
Quickstart verified last tested: 2026-04-23
from trove_classifiers import classifiers
# Check if a classifier is valid
if 'License :: OSI Approved' in classifiers:
print('Valid classifier')
else:
print('Invalid classifier')