diff --git a/README.md b/README.md index c1c271a..67f6c49 100644 --- a/README.md +++ b/README.md @@ -1,22 +1,27 @@ -Canonical source for [classifiers](https://pypi.org/classifiers/) on -[PyPI](https://pypi.org). Classifiers [categorize -projects](https://packaging.python.org/specifications/core-metadata/#classifier-multiple-use) -per [PEP 301](https://www.python.org/dev/peps/pep-0301/). Use this -package to validate classifiers in packages for PyPI upload or -download. +Canonical source for [classifiers][1] on [PyPI][2]. + +Classifiers [categorize projects][3] per [PEP 301][4]. Use this package to +validate classifiers in packages for PyPI upload or download. ## Usage -To install [from PyPI](https://pypi.org/project/trove-classifiers/): +To install [from PyPI][5]: + +``` +$ pip install trove-classifiers +``` + +This package can be invoked as a module to print a list of classifiers: ``` -> pip install trove-classifiers +$ python -m trove_classifiers | grep -Ei pyramid +Framework :: Pyramid ``` -This package's API is two importable objects: +In addition, this package's API is two importable objects: ### Classifiers (`trove_classifiers.classifiers`) -A `set` containing classifiers (as strings). Useful for determining membership +A `set` containing classifiers (as strings). Useful for determining membership. Example - determine if a classifier is valid: @@ -44,3 +49,9 @@ True >>> deprecated_classifiers["Natural Language :: Ukranian"] ['Natural Language :: Ukrainian'] ``` + +[1]: https://pypi.org/classifiers/ +[2]: https://pypi.org +[3]: https://packaging.python.org/specifications/core-metadata/#classifier-multiple-use +[4]: https://www.python.org/dev/peps/pep-0301/ +[5]: https://pypi.org/project/trove-classifiers/ diff --git a/setup.py b/setup.py index b7aa53a..e6b70a6 100644 --- a/setup.py +++ b/setup.py @@ -11,7 +11,7 @@ setup( name='trove-classifiers', - version='2020.04.01', + version='2020.04.09', description="Canonical source for classifiers on PyPI (pypi.org).", long_description=long_description, long_description_content_type="text/markdown", diff --git a/trove_classifiers/__main__.py b/trove_classifiers/__main__.py new file mode 100644 index 0000000..3c061fc --- /dev/null +++ b/trove_classifiers/__main__.py @@ -0,0 +1,4 @@ +from trove_classifiers import classifiers + +for classifier in sorted(classifiers): + print(classifier)