Skip to content

Support 'python -m trove_classifiers' #23

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 9, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 21 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -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:

Expand Down Expand Up @@ -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/
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
4 changes: 4 additions & 0 deletions trove_classifiers/__main__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
from trove_classifiers import classifiers

for classifier in sorted(classifiers):
print(classifier)