types-regex
Typing stubs for regex
Decision gist · record as of 2026-08-14
Yes, if you use the regex package and run type checking in your workflow. Install it alongside regex to enable full type support. If you don't use a type checker or don't use the regex library, there's no benefit.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.10 or later.
- This package is only useful when used alongside a type checker (mypy, pyright, etc.) in your development workflow.
- Low install friction; no runtime dependencies.
License · maintenance · safety
Apache-2.0 (permissive) — Licensed under Apache-2.0 (permissive), allowing use in both open-source and proprietary projects without significant restrictions.
last release 2026-07-20 (25 days) · last repo commit 2026-08-14 · 37 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 2,577,215 downloads/mo, #2,994 on PyPI
Alternatives
Verify before relying
pip install types-regex
# Then use regex with type checking enabled in your IDE or CI
import regex
pattern = regex.compile(r'\w+')- Whether this stub package remains synchronized with the latest regex package versions beyond 2026.7.19.
- Coverage completeness: whether all public regex APIs are fully annotated or if some remain untyped.
What it is and what it does
types-regex is a type stub package that provides static type annotations for the regex library. It allows Python type checkers to understand and validate code that uses the regex module, catching type errors before runtime. The package is maintained as part of typeshed, the standard repository of type stubs for the Python ecosystem, and is regularly tested against current versions of mypy and pyright.
When installed alongside regex, this package enables IDE autocompletion, type checking in CI/CD pipelines, and better code documentation through type hints. It has no runtime dependencies and adds no overhead to your application—it exists purely to inform type checkers during development and static analysis.
Use it for
- Enable mypy or pyright to type-check code using the regex library in a CI/CD pipeline.
- Get IDE autocomplete and type hints when writing regex patterns and method calls.
- Catch type mismatches (e.g., passing wrong argument types to regex functions) before deployment.
- Document regex usage in your codebase through static type information for other developers.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you use the regex package and run type checking in your workflow.
Install it alongside regex to enable full type support. If you don't use a type checker or don't use the regex library, there's no benefit.
Install
types-regex on PyPI
Before you install
Low install friction; no runtime dependencies. Actively maintained as part of typeshed, with recent updates and tested against mypy 2.3.0 and pyright 1.1.411.
Requires Python 3.10 or later. This package is only useful when used alongside a type checker (mypy, pyright, etc.) in your development workflow.
License in practice
Licensed under Apache-2.0 (permissive), allowing use in both open-source and proprietary projects without significant restrictions.
Quickstart
pip install types-regex
# Then use regex with type checking enabled in your IDE or CI
import regex
pattern = regex.compile(r'\w+')
Verify before relying
- Whether this stub package remains synchronized with the latest regex package versions beyond 2026.7.19.
- Coverage completeness: whether all public regex APIs are fully annotated or if some remain untyped.
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 25 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 2,577,215 / month, #2,994 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Programming Language :: Python :: 3Typing :: Stubs Only |
Evidence: types_regex-2026.7.19.20260720-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “type stubs for regex”
- types-regexProvides type annotations for the regex package, enabling type…
- google-re2-stubsProvides type stubs for the google-re2 package, enabling static type…
- google-re2A drop-in replacement for Python's re module that uses Google's RE2…
Give your agent the search over MCP, or paste the wish link into any chat.
More Software Development packages
Provides backported and experimental type hints for Python 3.9+, allowing use of newer typing features on older Python versions and enabling early experimentation with type system PEPs before they enter the standard library.
NumPy provides an N-dimensional array object and a comprehensive suite of mathematical, linear algebra, Fourier transform, and random number functions for scientific computing in Python.
FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.
Provides a way to document function parameters, class attributes, return types, and variables inline using Python's `Annotated` type hint syntax instead of traditional docstrings.
Typer builds command-line applications from Python functions using type hints, automatically generating help text, argument parsing, and shell completion.
Install it if you are building CLIs in Python.
Distlib provides low-level packaging utilities for building, distributing, and managing Python software—including metadata handling, version specifiers, wheel support, script installation, and dependency resolution.
See also types-jmespath · types-jwcrypto · types-mypy-extensions · types-simplejson · types-pyperclip · types-boltons · types-Markdown · types-pyflakes · types-croniter · google-re2-stubs