skillfed

types-DateTimeRange

Typing stubs for DateTimeRange

types-datetimerange v2.0.0.6 90.3K downloads/30d#13,596 on PyPI5,108
Permissive license Apache-2.0 license Active released

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-datetimerange

uv

uv add types-datetimerange

poetry

poetry add types-datetimerange

Installing 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

License :: OSI Approved :: Apache Software LicenseProgramming Language :: Python :: 3Typing :: Stubs Only

Tags

type stubs datetimerangepep 561 type stubsstatic type checking datetimepython type hints datetime rangetype checking datetimerangetyping stubs python
type-stubsstatic-analysis

More Software Development packages