six
Python 2 and 3 compatibility utilities
Install
six on PyPI
pip
pip install sixuv
uv add sixpoetry
poetry add sixPackage facts
| License | MIT (permissive) |
| Python support | supports the current Python release (!=3.0.*,!=3.1.*,!=3.2.*,>=2.7) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | actively maintained — 617 days since the last release |
| Last repo commit | |
| First released | |
| Popularity | one of the 100 most-downloaded packages on PyPI (30-day window, as of 2026-08-13) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-13) |
Evidence: six-1.17.0-py2.py3-none-any.whl
About six
from the package's own PyPI description — quoted content, verbatim
.. image:: https://img.shields.io/pypi/v/six.svg :target: https://pypi.org/project/six/ :alt: six on PyPI
.. image:: https://readthedocs.org/projects/six/badge/?version=latest :target: https://six.readthedocs.io/ :alt: six's documentation on Read the Docs
.. image:: https://img.shields.io/badge/license-MIT-green.svg :target: https://github.com/benjaminp/six/blob/master/LICENSE :alt: MIT License badge
Six is a Python 2 and 3 compatibility library. It provides utility functions for smoothing over the differences between the Python versions with the goal of writing Python code that is compatible on both Python versions. See the documentation for more information on what is provided.
Six supports Python 2.7 and 3.3+. It is contained in only one Python file, so it can be easily copied into your project. (The copyright and license notice must be retained.)
Online documentation is at https://six.readthedocs.io/.
Bugs can be reported to https://github.com/benjaminp/six. The code can also be found there.
Read as markdown · JSON record · Source repository · Homepage
AI interpretation — verify before relying
AI-generated interpretation of the package facts above; every digit, version, license, or vulnerability id it cites is grounded in the facts already shown on this page
Six provides utility functions to write Python code that runs on both Python 2.7 and Python 3.3+, abstracting away language differences between the two versions.
Extremely low friction: pure Python wheel with zero runtime dependencies. Actively maintained with last commit on 2026-02-23 and latest release on 2024-12-04.
MIT license is permissive; you may use, modify, and distribute freely in commercial and open-source projects provided you retain the copyright and license notice.
Usage
pip install six==1.17.0
import six
if six.PY2:
print('Running on Python 2')
else:
print('Running on Python 3')
Requires Python 2.7 or Python 3.3+; Python 3.0, 3.1, and 3.2 are explicitly unsupported.
Verdict: Six is a mature, zero-dependency compatibility library in the top 100 PyPI packages with no known vulnerabilities and active maintenance. It remains useful for codebases supporting both Python 2.7 and Python 3.3+.
Needs verification
- Current adoption patterns and whether six is still actively used in new projects versus primarily maintained for legacy codebases.
Similar packages
permissive · top 1,000 on PyPI
futurepermissive · top 1,000 on PyPI
zipppermissive · top 100 on PyPI
pybind11permissive · top 1,000 on PyPI
zstandardpermissive · top 1,000 on PyPI
html5libpermissive · top 1,000 on PyPI
mockpermissive · top 1,000 on PyPI
google-pastapermissive · top 1,000 on PyPI
SQLAlchemypermissive · top 100 on PyPI
fsspecunclear · top 100 on PyPI