# benjaminp/six

Python 2 and 3 compatibility library

Repository: https://github.com/benjaminp/six
Canonical: https://ross.abutalabs.com/products/six
Homepage: https://six.readthedocs.io/
Language: Python
License: MIT
License Family: permissive
Last push: 2026-02-23T02:19:45+00:00

## Health v2 (maintenance only)
Score: 63/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 68, release rhythm 35, longevity 100
- inputs: {"age_days": 3530, "days_push": 192, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1028, forks 276 (observed 2026-08-28T04:03:17.250073+00:00)

## What it is
Six is a Python 2 and 3 compatibility library providing utility functions and constants to smooth over differences between the two Python versions. It is a single Python file that can be easily vendored into projects to write code compatible with both versions.

## Use cases
- write code that runs on both python 2 and python 3
- smooth over string type differences between python 2 and 3
- handle integer type differences like long vs int
- vendor a compatibility shim into a project as one file
- detect which python version the code is running on

## When to choose
- maintaining a legacy codebase that must support Python 2.7 and Python 3 simultaneously
- you need a tiny, dependency-free compatibility layer you can copy into your project

## When to avoid
- your project only targets Python 3
- starting a new project, since Python 2 is end-of-life and modern alternatives or native Python 3 code are preferred

## Facets
- artifact type: library
- maturity: maintenance
- function: developer-tools
- domain: developer-tools, programming-languages
- platform: python, cross-platform
- tags: python-2, python-3, compatibility, single-file

## Member repositories
- benjaminp/six (main) score 63

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:03:17.250073+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T07:07:44.111442+00:00, confidence not recorded.
  - readme: https://github.com/benjaminp/six (fetched 2026-08-28T04:03:17.250073+00:00, sha ca64c34dcb4a)
  - homepage: https://six.readthedocs.io/ (fetched 2026-08-29T13:07:56.754967+00:00, sha 8d8f44245d42)
  - registry_pypi: https://pypi.org/pypi/six/json (fetched 2026-08-29T13:07:56.764856+00:00, sha 0c0ec9ef2e2e)
- Data as of 2026-08-30T08:39:29.467469+00:00.
