skillfed

types-mysqlclient

Typing stubs for mysqlclient

types-mysqlclient v2.2.0.20260508 287.8K downloads/30d#8,027 on PyPI37
Permissive license Apache-2.0 Active released

What it is and what it does

types-mysqlclient is a type stub package that supplies type annotations for the mysqlclient MySQL driver. It allows Python type checkers like mypy and pyright to understand the types and signatures of mysqlclient's API, catching type errors in your code before runtime. The stubs are maintained as part of the typeshed project and are tested against current versions of popular type checkers.

This package does not provide mysqlclient itself—you must install mysqlclient separately to actually connect to MySQL databases. The stubs are purely informational for static analysis tools. They target mysqlclient 2.2.* and require Python 3.10 or later.

Use it for:

  • Enable mypy or pyright to type-check code that imports and uses mysqlclient.
  • Catch type mismatches in database connection parameters and query results before runtime.
  • Provide IDE autocomplete and type hints when working with mysqlclient in an editor.
  • Enforce type safety in a CI/CD pipeline that runs static type checking on Python projects using MySQL.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Provides type annotations for the mysqlclient MySQL database driver, enabling static type checking of code that uses mysqlclient.

Yes, if you use mysqlclient and run static type checking. It has no runtime cost, low install friction, and is actively maintained. Install it alongside mysqlclient in development and CI environments to catch type errors early. Not necessary if you don't use type checkers.

Install

types-mysqlclient on PyPI

pip

pip install types-mysqlclient

uv

uv add types-mysqlclient

poetry

poetry add types-mysqlclient

Installing types-mysqlclient

Before you install

Low friction; pure Python stub package with no runtime dependencies. Actively maintained as part of typeshed, last updated 98 days ago.

License in practice

Apache-2.0 permissive license allows free use, modification, and distribution with minimal restrictions.

Quickstart

pip install types-mysqlclient

# Then use with type checker (mypy, pyright)
# mypy your_code.py
# or configure in pyproject.toml/mypy.ini

Requires Python 3.10 or later; only provides type information, does not provide mysqlclient itself.

Verify before relying

  • Whether this stub version remains synchronized with mysqlclient 2.2.* releases after typeshed updates.
  • Compatibility with type checkers beyond mypy 1.20.0 and pyright 1.1.408.

Package facts

License Apache-2.0 (permissive)
Python support supports the current Python release (>=3.10)
Install friction low — pure-Python wheel
Runtime dependencies none
Maintenance actively maintained — 98 days since the last release
Last repo commit
First released
Downloads 287,769/month — #8,027 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: types_mysqlclient-2.2.0.20260508-py3-none-any.whl

Programming Language :: Python :: 3Typing :: Stubs Only

Tags

type stubs mysqlclientmypy mysqlclient annotationsstatic typing mysql pythontype hints database driverpyright mysql stubsmysqlclient type checkingpython mysql type hints
type-stubsstatic-analysis

More Database packages