# spyder-ide/qtpy

Provides an uniform layer to support PyQt5, PySide2, PyQt6, PySide6 with a single codebase

Repository: https://github.com/spyder-ide/qtpy
Canonical: https://ross.abutalabs.com/products/qtpy
Language: Python
License: MIT
License Family: permissive
Topics: python, qtpy, spyder, qt-gui, pyqt, pyside, pyside2, pyside6, pyqt6, closember
Last push: 2026-04-12T05:22:34+00:00

## Health v2 (maintenance only)
Score: 60/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 77, release rhythm 16, longevity 100
- inputs: {"age_days": 4141, "days_push": 143, "days_rel": 568, "gap_med": 98, "n_releases_24m": 2}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1102, forks 163 (observed 2026-08-28T04:03:35.788287+00:00)

## What it is
QtPy is a Python library providing a uniform abstraction layer over the PyQt5, PyQt6, PySide2, and PySide6 Qt bindings, letting developers write a single codebase that works with any of them. It auto-detects the installed binding, normalizes module layouts, and handles API incompatibilities between Qt5 and Qt6.

## Use cases
- write a python gui app that works with both pyqt and pyside
- support qt5 and qt6 from a single codebase
- port a pyqt5 application to qt6 incrementally
- avoid conditional imports for different qt bindings
- let users choose their preferred qt binding via an environment variable

## When to choose
- you are building a desktop GUI in Python and want binding flexibility
- you maintain a library that must support multiple Qt bindings
- you are migrating a Qt5 codebase toward Qt6

## When to avoid
- you have already committed to a single Qt binding and never plan to change
- you need Qt bindings installed - QtPy does not bundle PyQt or PySide itself
- you are building a non-GUI application

## Facets
- artifact type: library
- maturity: active
- function: gui, ui-components, developer-tools
- domain: cross-platform, desktop-applications, developer-tools
- platform: python, cross-platform
- tags: qt, pyqt, pyside, qt-bindings, abstraction-layer, desktop-gui, desktop

## Member repositories
- spyder-ide/qtpy (main) score 60

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:03:35.788287+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-30T06:45:39.667113+00:00, confidence not recorded.
  - readme: https://github.com/spyder-ide/qtpy (fetched 2026-08-28T04:03:35.788287+00:00, sha dfde37c6ca04)
  - registry_pypi: https://pypi.org/pypi/qtpy/json (fetched 2026-08-29T12:48:45.751206+00:00, sha d5a479674b9c)
- Data as of 2026-08-30T08:39:29.467469+00:00.
