types-freezegun
Typing stubs for freezegun
What it is and what it does
This is a PEP 561 type stub package that provides type information for the freezegun time-mocking library. It allows static type checkers like mypy, PyCharm, and pytype to understand and validate the types used in freezegun code without needing runtime execution. The stubs are sourced from the typeshed project, a centralized repository of type definitions for the Python ecosystem.
However, this package is largely obsolete: freezegun has shipped with its own type annotations since version 1.2.1, making separate stubs unnecessary for modern installations. The package has not been updated since 2022-06-09, and the description explicitly recommends uninstalling it if you use freezegun 1.2.1 or newer.
Use it for:
- Type-checking legacy projects that depend on freezegun versions older than 1.2.1 without built-in type support.
- Providing type hints in environments where freezegun's bundled stubs are unavailable or not recognized by the type checker.
- Validating freezegun usage in codebases that require strict type checking before freezegun added native type annotations.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides type stubs for the freezegun time-mocking library, enabling type checkers like mypy and PyCharm to validate code that uses freezegun.
No, unless you are locked into freezegun < 1.2.1. For any modern freezegun installation (1.2.1+), uninstall this package and rely on freezegun's built-in type stubs instead. The package has not been updated since 2022-06-09 and the project itself recommends against using it with current freezegun versions.
Install
types-freezegun on PyPI
pip
pip install types-freezegunuv
uv add types-freezegunpoetry
poetry add types-freezegunInstalling types-freezegun
Before you install
Low install friction with no runtime dependencies. However, the package is outdated: freezegun has included its own type annotations since version 1.2.1, making this stub package unnecessary for modern freezegun installations. Last release was 2022-06-09, significantly in the past.
License in practice
Licensed under Apache-2.0, a permissive open-source license with no significant restrictions on use or redistribution.
Quickstart
pip install types-freezegun
# Then use freezegun normally; type checkers will resolve types automatically
import freezegun
with freezegun.freeze_time():
pass
Only needed if using freezegun < 1.2.1; freezegun 1.2.1+ includes its own type stubs, making this package redundant.
Verify before relying
- Whether this stub package is still maintained or if typeshed updates are being backported to PyPI
- Compatibility with the latest freezegun versions and whether the stubs remain accurate
- Current status of freezegun's bundled type annotations and how they compare to these stubs
Package facts
| License | Apache-2.0 license (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | actively maintained — 1,527 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 2,888,281/month — #2,841 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: types_freezegun-1.1.10-py3-none-any.whl
Tags
More Software Development packages
Provides backported and experimental type hints…
permissive · top 100 on PyPI
numpyNumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
distlibDistlib provides low-level packaging utilities…
permissive · top 1,000 on PyPI
types-filelockProvides type stubs for the filelock package to…
permissive · top 15,000 on PyPI
types-WerkzeugProvides PEP 561 type stubs for Werkzeug,…
permissive · top 5,000 on PyPI
types-orjsonProvides PEP 561 type stubs for the orjson…
permissive · top 15,000 on PyPI
types-tornadoProvides PEP 561 type stubs for tornado,…
permissive · top 15,000 on PyPI
types-Jinja2Provides PEP 561 type stubs for Jinja2,…
permissive · top 5,000 on PyPI
types-DateTimeRangeProvides type stubs for the DateTimeRange…
permissive · top 15,000 on PyPI
types-futuresProvides type stubs for the futures package,…
permissive · top 15,000 on PyPI
types-attrsProvides PEP 561 type stubs for the attrs…
permissive · top 15,000 on PyPI
types-FlaskProvides PEP 561 type stubs for Flask to enable…
permissive · top 5,000 on PyPI
freezegunFreezeGun mocks Python's datetime and time…
permissive · top 1,000 on PyPI