{"id":46711,"library":"types-django-filter","title":"types-django-filter","description":"PEP 561 type stubs for django-filter, provided by typeshed. Version 25.2.0.20260508. Updated frequently alongside typeshed releases.","status":"active","version":"25.2.0.20260508","language":"python","source_language":"en","source_url":"https://github.com/python/typeshed","tags":["django","filter","type-stubs","typing"],"install":[{"cmd":"pip install types-django-filter","lang":"bash","label":"pip install types-django-filter"}],"dependencies":[{"reason":"Runtime dependency; stubs provide typing for django-filter.","package":"django-filter","optional":false},{"reason":"Many types reference Django internals; recommended for full type checking.","package":"django-stubs","optional":true}],"imports":[{"wrong":"from django_filters import FilterSet","symbol":"FilterSet","correct":"from django_filters_stubs import FilterSet"}],"quickstart":{"code":"from django_filters import FilterSet, CharFilter\nfrom myapp.models import MyModel\n\nclass MyFilterSet(FilterSet):\n    name = CharFilter(lookup_expr='icontains')\n\n    class Meta:\n        model = MyModel\n        fields = ['name']","lang":"python","description":"Define a basic FilterSet; types-django-filter provides type hints for FilterSet, fields, and lookup expressions."},"warnings":[{"fix":"Use a compatible version or consider maintaining your own stubs if you need the latest django-filter features.","message":"This stub package is automatically published by typeshed and may lag behind django-filter releases. Always check compatibility.","severity":"deprecated","affected_versions":"*"},{"fix":"Install django-stubs alongside types-django-filter: pip install django-stubs","message":"Installing types-django-filter without django-stubs can lead to incomplete type inference for model fields inside FilterSet.Meta.","severity":"gotcha","affected_versions":">=3.10"},{"fix":"Add # type: ignore or provide custom type stubs for unsupported patterns.","message":"The stubs may not cover custom filter methods or dynamic lookup expressions. You might need to add your own type annotations.","severity":"gotcha","affected_versions":"*"},{"fix":"Use Python 3.10+ and pin version if needed: pip install types-django-filter==25.2.0.20260508","message":"Versioning changes: types-django-filter uses CalVer (YY.MM.PATCH). Ensure pip resolves the correct version with your Python version (requires >=3.10).","severity":"breaking","affected_versions":"25.2.0.20260508"}],"env_vars":null,"search_vec":"'25.2.0.20260508':17 '561':6 'alongsid':20 'django':3,11,23 'django-filt':10 'filter':4,12,24 'frequent':19 'pep':5 'provid':13 'releas':22 'stub':8,27 'type':2,7,26,28 'type-stub':25 'types-django-filt':1 'typesh':15,21 'updat':18 'version':16","created_at":"2026-06-07T13:01:15.445028+00:00","updated_at":"2026-06-07T13:01:15.445028+00:00","problems":{"verify_error":"Traceback (most recent call last):\n  File \"<string>\", line 1, in <module>\nModuleNotFoundError: No module named 'django_filters_stubs'"},"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/python/typeshed","github":"https://github.com/python/typeshed","docs":null,"changelog":null,"pypi":null,"npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["database"],"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}}