--- id: types-mysqlclient version: "2.2.0.20260508" license: Apache-2.0 license_treatment: permissive maintenance: active --- # types-mysqlclient — Typing stubs for mysqlclient License: permissive · Maintenance: active · Downloads: 287.8K/mo ## 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 above — 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 pip install types-mysqlclient uv add types-mysqlclient 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_current - Install friction: low - Maintenance: active - Downloads: 287.8K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags type stubs mysqlclient, mypy mysqlclient annotations, static typing mysql python, type hints database driver, pyright mysql stubs, mysqlclient type checking, python mysql type hints, type-stubs, static-analysis [View on SkillFed](https://skillfed.io/packages/types-mysqlclient) · [View on PyPI](https://pypi.org/project/types-mysqlclient/)