# PyMySQL/PyMySQL

MySQL client library for Python

Repository: https://github.com/PyMySQL/PyMySQL
Canonical: https://ross.abutalabs.com/products/pymysql
Homepage: https://pymysql.readthedocs.io/
Language: Python
License: MIT
License Family: permissive
Topics: python, mysql
Last push: 2026-08-18T09:00:54+00:00

## Health v2 (maintenance only)
Score: 85/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 98, release rhythm 60, longevity 100
- inputs: {"age_days": 5516, "days_push": 15, "days_rel": 106, "gap_med": 133.0, "n_releases_24m": 3}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 7844, forks 1439 (observed 2026-08-28T04:10:07.028464+00:00)

## What it is
PyMySQL is a pure-Python client library for MySQL and MariaDB, implementing the PEP 249 DB-API 2.0 interface. It requires no compiled extensions, making it easy to install and portable across Python implementations including PyPy.

## Use cases
- connect to mysql from python
- query mariadb database in python
- pure python mysql driver without c dependencies
- execute sql inserts and selects with parameterized queries
- use mysql with pypy
- db-api 2.0 compliant mysql client

## When to choose
- you need a dependency-free, pure-Python MySQL/MariaDB driver
- you're on PyPy or a platform where C extensions are hard to build
- you want a lightweight DB-API 2.0 client without an ORM

## When to avoid
- you need maximum performance, where mysqlclient (C-based) is faster
- you want an ORM with models and migrations
- you use a different database like PostgreSQL

## Facets
- artifact type: library
- maturity: stable
- function: database-driver, database
- domain: databases, backend, developer-tools
- platform: python, cross-platform
- tags: mysql, mariadb, db-api, pure-python, sql

## Member repositories
- PyMySQL/PyMySQL (main) score 85

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:10:07.028464+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-29T17:33:50.411442+00:00, confidence not recorded.
  - readme: https://github.com/PyMySQL/PyMySQL (fetched 2026-08-28T04:10:07.028464+00:00, sha 72192c58da51)
  - registry_pypi: https://pypi.org/pypi/pymysql/json (fetched 2026-08-29T08:30:57.195603+00:00, sha a019592106db)
- Data as of 2026-08-30T08:39:29.467469+00:00.
