types-dateparser is a type stub package that provides external type annotations for the `dateparser` library. It enables static type checkers (like MyPy or Pyright) to analyze code using `dateparser` for type correctness without affecting runtime behavior. The current version, `1.4.0.20260408`, indicates it aims to provide accurate annotations for `dateparser~=1.4.0`, with the last part reflecting the typeshed release date. Updates are frequent, often daily, reflecting typeshed's continuous integration and bug fixes.
pip install types-dateparserVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates the typical usage of the `dateparser` library, which is enhanced by the `types-dateparser` stubs for static type checking. The stubs themselves are not directly used in the runtime code.
Always import from the `dateparser` package for runtime functionality: `import dateparser` or `from dateparser import parse`.
Pin the `types-dateparser` version to match your `dateparser` dependency's major/minor/patch versions (e.g., `pip install 'dateparser==1.4.0' 'types-dateparser==1.4.0.*'`).
Rely on your type checker's automatic stub discovery mechanism. Only use explicit path configurations if you are developing stubs or facing specific advanced scenarios.
Review `dateparser`'s release notes for breaking changes and update your code and type annotations accordingly. Update `types-dateparser` in conjunction with `dateparser` to maintain type accuracy.