Skip to content

Commit 51c79b0

Browse files
authored
Support 'python -m trove_classifiers' (#23)
* README tweaks * Support 'python -m trove_classifiers' * Version 2020.04.09
1 parent f4aaf0c commit 51c79b0

File tree

3 files changed

+26
-11
lines changed

3 files changed

+26
-11
lines changed

README.md

Lines changed: 21 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,27 @@
1-
Canonical source for [classifiers](https://pypi.org/classifiers/) on
2-
[PyPI](https://pypi.org). Classifiers [categorize
3-
projects](https://packaging.python.org/specifications/core-metadata/#classifier-multiple-use)
4-
per [PEP 301](https://www.python.org/dev/peps/pep-0301/). Use this
5-
package to validate classifiers in packages for PyPI upload or
6-
download.
1+
Canonical source for [classifiers][1] on [PyPI][2].
2+
3+
Classifiers [categorize projects][3] per [PEP 301][4]. Use this package to
4+
validate classifiers in packages for PyPI upload or download.
75

86
## Usage
97

10-
To install [from PyPI](https://pypi.org/project/trove-classifiers/):
8+
To install [from PyPI][5]:
9+
10+
```
11+
$ pip install trove-classifiers
12+
```
13+
14+
This package can be invoked as a module to print a list of classifiers:
1115

1216
```
13-
> pip install trove-classifiers
17+
$ python -m trove_classifiers | grep -Ei pyramid
18+
Framework :: Pyramid
1419
```
1520

16-
This package's API is two importable objects:
21+
In addition, this package's API is two importable objects:
1722

1823
### Classifiers (`trove_classifiers.classifiers`)
19-
A `set` containing classifiers (as strings). Useful for determining membership
24+
A `set` containing classifiers (as strings). Useful for determining membership.
2025

2126
Example - determine if a classifier is valid:
2227

@@ -44,3 +49,9 @@ True
4449
>>> deprecated_classifiers["Natural Language :: Ukranian"]
4550
['Natural Language :: Ukrainian']
4651
```
52+
53+
[1]: https://pypi.org/classifiers/
54+
[2]: https://pypi.org
55+
[3]: https://packaging.python.org/specifications/core-metadata/#classifier-multiple-use
56+
[4]: https://www.python.org/dev/peps/pep-0301/
57+
[5]: https://pypi.org/project/trove-classifiers/

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
setup(
1313
name='trove-classifiers',
14-
version='2020.04.01',
14+
version='2020.04.09',
1515
description="Canonical source for classifiers on PyPI (pypi.org).",
1616
long_description=long_description,
1717
long_description_content_type="text/markdown",

trove_classifiers/__main__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
from trove_classifiers import classifiers
2+
3+
for classifier in sorted(classifiers):
4+
print(classifier)

0 commit comments

Comments
 (0)