types-DateTimeRange
Typing stubs for DateTimeRange
What it is and what it does
types-DateTimeRange is a PEP 561 type stub package that provides type information for the DateTimeRange library to static type checkers. It acts as a bridge between type checkers and the DateTimeRange package, allowing those tools to understand and validate the types used in DateTimeRange code.
The package is maintained as part of typeshed and depends on types-python-dateutil for its own type information. However, the package documentation indicates that DateTimeRange has included native type annotations since version 2.1.0, making this stub package redundant for users on that version or later.
Use it for:
- Enable type checkers to validate code using DateTimeRange in projects on version 2.0.x.
- Provide type hints for DateTimeRange in IDEs when using older DateTimeRange versions.
- Validate datetime range operations in a codebase with strict type checking enabled.
- Support type-aware code completion for DateTimeRange in compatible editors.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides type stubs for the DateTimeRange package, enabling static type checkers to validate code using DateTimeRange.
Yes, but only if you are using DateTimeRange version 2.0.x and need type checking support. If you are on DateTimeRange 2.1.0 or later, uninstall this package—DateTimeRange now includes its own type annotations. The package is stable and actively maintained via typeshed, with no known vulnerabilities.
Install
types-datetimerange on PyPI
pip
pip install types-datetimerangeuv
uv add types-datetimerangepoetry
poetry add types-datetimerangeInstalling types-DateTimeRange
Before you install
Low install friction with a single lightweight dependency on types-python-dateutil. The package is actively maintained via typeshed, though it has not been updated since 2023-07-20.
License in practice
Licensed under Apache-2.0, a permissive license that allows use in most projects without restriction.
Quickstart
pip install types-DateTimeRange
# Type checkers will now understand DateTimeRange types in your code
Only useful if you are using DateTimeRange version 2.0.x; DateTimeRange 2.1.0 and later include their own type annotations, making this package unnecessary.
Verify before relying
- Whether the stubs remain accurate for DateTimeRange versions released after 2023-07-20.
- Compatibility with type checker versions beyond those tested (1.4.1, 1.1.318, 2023.6.16).
Package facts
| License | Apache-2.0 license (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — types-python-dateutil |
| Maintenance | actively maintained — 1,121 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 90,346/month — #13,596 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: types_DateTimeRange-2.0.0.6-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-typed-astProvides type stubs for the typed-ast package,…
permissive · top 15,000 on PyPI
types-tzlocalProvides type stubs for the tzlocal package,…
permissive · top 5,000 on PyPI
types-futuresProvides type stubs for the futures package,…
permissive · top 15,000 on PyPI
types-SQLAlchemyProvides PEP 561 type stubs for SQLAlchemy,…
permissive · top 15,000 on PyPI
DateTimeRangeDateTimeRange creates and manipulates time…
permissive · top 15,000 on PyPI
types-urllib3Provides type stubs for urllib3 to enable…
permissive · top 1,000 on PyPI
types-contextvarsProvides type stubs for Python's contextvars…
permissive · top 15,000 on PyPI
types-termcolorProvides type stubs for the termcolor package,…
permissive · top 15,000 on PyPI
types-beautifulsoup4Provides type hints for beautifulsoup4 code via…
permissive · top 5,000 on PyPI
types-dataclassesProvides type stubs for Python's dataclasses…
permissive · top 15,000 on PyPI