{"id":335,"library":"trove-classifiers","title":"Trove Classifiers","description":"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.","status":"active","version":"2026.1.14.14","language":"python","source_language":"en","source_url":"https://github.com/pypa/trove-classifiers","tags":["PyPI","classifiers","Python packaging"],"install":[{"cmd":"pip install trove-classifiers","lang":"bash","label":"Install trove-classifiers"}],"dependencies":[],"imports":[{"note":"Access the set of valid classifiers.","symbol":"classifiers","correct":"from trove_classifiers import classifiers"},{"note":"Access the dictionary of deprecated classifiers.","symbol":"deprecated_classifiers","correct":"from trove_classifiers import deprecated_classifiers"}],"quickstart":{"code":"from trove_classifiers import classifiers\n\n# Check if a classifier is valid\nif 'License :: OSI Approved' in classifiers:\n    print('Valid classifier')\nelse:\n    print('Invalid classifier')","lang":"python","description":"Example usage to validate a classifier."},"warnings":[{"fix":"Regularly review the 'deprecated_classifiers' dictionary to ensure compatibility with future versions.","message":"The 'deprecated_classifiers' dictionary may change in future versions, potentially affecting code that relies on specific deprecated classifiers.","severity":"breaking","affected_versions":"2026.1.14.14"},{"fix":"Use a virtual environment instead: https://pip.pypa.io/warnings/venv","message":"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.","severity":"gotcha","affected_versions":"all"},{"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.","message":"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.","severity":"breaking","affected_versions":"pip: >=25.3"}],"env_vars":null,"last_verified":"2026-05-12T13:08:19.583Z","next_check":"2026-06-26T00:00:00.000Z","problems":[{"fix":"pip install trove-classifiers","cause":"The 'trove-classifiers' package is not installed in the current Python environment.","error":"ModuleNotFoundError: No module named 'trove_classifiers'"},{"fix":"Use `trove_classifiers.list_classifiers()` to get all classifiers or `trove_classifiers.is_valid_classifier()` to check a specific classifier string.","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.","error":"ImportError: cannot import name 'Classifier' from 'trove_classifiers'"},{"fix":"Use `trove_classifiers.is_valid_classifier(classifier_string)` to check if a classifier is valid.","cause":"The 'trove_classifiers' module does not have an attribute or function named 'validate_classifier'; the correct function for validation is 'is_valid_classifier'.","error":"AttributeError: module 'trove_classifiers' has no attribute 'validate_classifier'"},{"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\")`.","cause":"The `trove_classifiers.is_valid_classifier()` function expects a string argument representing the classifier, but received an integer or other non-string type.","error":"TypeError: expected string, int found"}],"ecosystem":"pypi","meta_description":null,"install_score":100,"install_tag":"verified","quickstart_score":80,"quickstart_tag":"verified","pypi_latest":null,"install_checks":{"last_tested":"2026-05-12","tag":"verified","tag_description":"installs cleanly on critical runtimes, fast import, recently tested","results":[{"runtime":"python:3.10-alpine","python_version":"3.10","os_libc":"alpine (musl)","variant":"default","exit_code":0,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":0.01,"mem_mb":0.6,"disk_size":"17.9M"},{"runtime":"python:3.10-slim","python_version":"3.10","os_libc":"slim (glibc)","variant":"default","exit_code":0,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":0,"mem_mb":0.6,"disk_size":"18M"},{"runtime":"python:3.11-alpine","python_version":"3.11","os_libc":"alpine (musl)","variant":"default","exit_code":0,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":0.02,"mem_mb":0.7,"disk_size":"19.7M"},{"runtime":"python:3.11-slim","python_version":"3.11","os_libc":"slim (glibc)","variant":"default","exit_code":0,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":0.01,"mem_mb":0.7,"disk_size":"20M"},{"runtime":"python:3.12-alpine","python_version":"3.12","os_libc":"alpine (musl)","variant":"default","exit_code":0,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":0.02,"mem_mb":0.7,"disk_size":"11.6M"},{"runtime":"python:3.12-slim","python_version":"3.12","os_libc":"slim (glibc)","variant":"default","exit_code":0,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":0.01,"mem_mb":0.7,"disk_size":"12M"},{"runtime":"python:3.13-alpine","python_version":"3.13","os_libc":"alpine (musl)","variant":"default","exit_code":0,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":0.01,"mem_mb":0.8,"disk_size":"11.2M"},{"runtime":"python:3.13-slim","python_version":"3.13","os_libc":"slim (glibc)","variant":"default","exit_code":0,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":0.01,"mem_mb":0.6,"disk_size":"12M"},{"runtime":"python:3.9-alpine","python_version":"3.9","os_libc":"alpine (musl)","variant":"default","exit_code":0,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":0.01,"mem_mb":0.5,"disk_size":"17.4M"},{"runtime":"python:3.9-slim","python_version":"3.9","os_libc":"slim (glibc)","variant":"default","exit_code":0,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":0.01,"mem_mb":0.5,"disk_size":"18M"}]},"quickstart_checks":{"last_tested":"2026-04-23","tag":"verified","tag_description":"quickstart runs on critical runtimes, recently tested","results":[{"runtime":"python:3.10-alpine","exit_code":0},{"runtime":"python:3.10-slim","exit_code":0},{"runtime":"python:3.11-alpine","exit_code":0},{"runtime":"python:3.11-slim","exit_code":0},{"runtime":"python:3.12-alpine","exit_code":0},{"runtime":"python:3.12-slim","exit_code":0},{"runtime":"python:3.13-alpine","exit_code":0},{"runtime":"python:3.13-slim","exit_code":0},{"runtime":"python:3.9-alpine","exit_code":0},{"runtime":"python:3.9-slim","exit_code":0}]}}