{"id":22492,"library":"types-datetimerange","title":"types-datetimerange","description":"Typing stubs for DateTimeRange, part of the typeshed project. Provides type hints for the DateTimeRange library. Version 2.0.0.6; updated periodically with typeshed releases.","status":"active","version":"2.0.0.6","language":"python","source_language":"en","source_url":"https://github.com/python/typeshed","tags":["typeshed","typing-stubs","DateTimeRange","type-hints"],"install":[{"cmd":"pip install types-datetimerange","lang":"bash","label":"pip install"}],"dependencies":[{"reason":"Runtime dependency that types-datetimerange provides stubs for.","package":"DateTimeRange","optional":false}],"imports":[{"wrong":"from datetimerange import DateTimeRange","symbol":"DateTimeRange","correct":"from datetimerange-stubs import DateTimeRange"}],"quickstart":{"code":"from datetimerange import DateTimeRange\n# No extra import needed for typing stubs; they are automatically used by mypy/pyright when types-datetimerange is installed.\nrange = DateTimeRange(\"2023-01-01\", \"2023-01-31\")\nprint(range)","lang":"python","description":"Basic usage of DateTimeRange with typing stubs."},"warnings":[{"fix":"pip install --upgrade types-datetimerange DateTimeRange","message":"Types stubs may lag behind DateTimeRange releases; if you encounter type errors, ensure both packages are up-to-date.","severity":"breaking","affected_versions":"all"},{"fix":"Use `# type: ignore` if needed.","message":"These are third-party stubs maintained by typeshed; they may not cover all edge cases. Report missing stubs to typeshed.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"search_vec":"'2.0.0.6':21 'datetimerang':3,7,18,31 'hint':15,34 'librari':19 'part':8 'period':23 'project':12 'provid':13 'releas':26 'stub':5,30 'type':2,4,14,29,33 'type-hint':32 'types-datetimerang':1 'typesh':11,25,27 'typing-stub':28 'updat':22 'version':20","created_at":"2026-04-27T17:05:27.357789+00:00","updated_at":"2026-04-27T17:05:27.357789+00:00","problems":{"verify_error":"File \"<string>\", line 1\n    from datetimerange-stubs import DateTimeRange\n                      ^\nSyntaxError: invalid syntax"},"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":"2.0.0.6","cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/typeshed-internal/stub_uploader","docs":null,"changelog":"https://github.com/typeshed-internal/stub_uploader/blob/main/data/changelogs/DateTimeRange.md","pypi":"https://pypi.org/project/types-datetimerange/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["type-stubs"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"import_fail","verified_at":"2026-07-03","last_verified":"2026-07-03","next_check":"2026-07-10","install_tag":null}}