Classifying Your Package

The Python Package Index (“PyPI”) contains thousands of Python libraries. Proper classification metadata will allow people to find yours more easily. PyPI lets you browse packages by classifier. You can even select multiple classifiers to narrow your search. Classifiers are not invisible metadata that you can just ignore!

To classify your software, pass a classifiers parameter to the Distutils setup() function. The classifiers parameter is a list of strings. These strings are not freeform. All classifier strings should come from this list on PyPI.

Classifiers are optional. You can write a Distutils setup script without any classifiers at all. Don’t do that. You should always include at least these classifiers:

  • Programming Language. In particular, you should include both “Programming Language :: Python” and “Programming Language :: Python :: 3”. If you do not include these, your package will not show up in this list of Python 3-compatible libraries, which linked from the sidebar of every single page of pypi.python.org.
  • License. This is the absolute first thing I look for when I’m evaluating third-party libraries. Don’t make me hunt for this vital information. Don’t include more than one license classifier unless your software is explicitly available under multiple licenses. (And don’t release software under multiple licenses unless you’re forced to do so. And don’t force other people to do so. Licensing is enough of a headache; don’t make it worse.)
  • Operating System. If your software only runs on Windows (or Mac OS X, or Linux), I want to know sooner rather than later. If your software runs anywhere without any platform-specific code, use the classifier “Operating System :: OS Independent”. Multiple Operating System classifiers are only necessary if your software requires specific support for each platform. (This is not common.)

I also recommend that you include the following classifiers:

  • Development Status. Is your software beta quality? Alpha quality? Pre-alpha? Pick one. Be honest.
  • Intended Audience. Who would download your software? The most common choices are Developers, End Users/Desktop, Science/Research, and System Administrators.
  • Framework. If your software is a plugin for a larger Python framework like Django or Zope, include the appropriate Framework classifier. If not, omit it.
  • Topic. There are a large number of topics to choose from; choose all that apply.

Examples of Good Package Classifiers

By way of example, here are the classifiers for Django, a production-ready, cross-platform, bsd-licensed web application framework that runs on your web server. (Django is not yet compatible with Python 3, so the Programming Language :: Python :: 3 classifier is not listed.)

Get hands-on with 1200+ tech skills courses.