{"id":8098,"library":"django-filter-stubs","title":"django-filter-stubs","description":"django-filter-stubs provides PEP-484 compatible type stubs for the popular `django-filter` library, enabling static type checking with tools like Mypy. The project is currently at version 0.2.0, but it has been officially archived by its maintainers, meaning no further development, updates, or releases are expected.","status":"abandoned","version":"0.2.0","language":"python","source_language":"en","source_url":"https://github.com/DavisRayM/django-filter-stubs","tags":["django","mypy","type-stubs","typing"],"install":[{"cmd":"pip install django-filter-stubs","lang":"bash","label":"Install latest version"}],"dependencies":[{"reason":"Provides type stubs for this library.","package":"django-filter","optional":false},{"reason":"Implicit dependency for any Django project using django-filter.","package":"django","optional":false},{"reason":"Required for static type checking to utilize these stubs.","package":"mypy","optional":false}],"imports":[{"wrong":"from django_filters_stubs import FilterSet","symbol":"FilterSet","correct":"from django_filters_stubs import FilterSet"}],"quickstart":{"code":"# mypy.ini or pyproject.toml\n\n# For mypy.ini:\n[mypy]\nplugins = mypy_django_plugin.main # If using django-stubs\n\n# For pyproject.toml:\n[tool.mypy]\nplugins = [\"mypy_django_plugin.main\"] # If using django-stubs\n\n# In your Django project's Python code:\n# This code would benefit from django-filter-stubs for type checking\nfrom django import forms\nfrom django_filters import FilterSet, CharFilter\nfrom django.db import models\n\nclass Product(models.Model):\n    name = models.CharField(max_length=255)\n    description = models.TextField()\n\n    class Meta:\n        app_label = 'myapp'\n\nclass ProductFilter(FilterSet):\n    name = CharFilter(field_name='name', lookup_expr='icontains')\n\n    class Meta:\n        model = Product\n        fields = ['name']\n\ndef get_filtered_products(request, queryset):\n    product_filter = ProductFilter(request.GET, queryset=queryset)\n    return product_filter.qs\n","lang":"python","description":"To use `django-filter-stubs`, simply install the package. Mypy will automatically discover and use the type stubs for `django-filter` and its submodules (like `django_filters.rest_framework`) during its static analysis pass. No explicit imports from `django_filter_stubs` are required. Ensure your Mypy configuration is set up correctly for Django projects, ideally using `django-stubs` if available, to handle Django's runtime 'magic'."},"warnings":[{"fix":"Consider migrating to `types-django-filter` (from typeshed, installed via `pip install types-django-filter`), which is actively maintained and provides current stubs for `django-filter`.","message":"The `django-filter-stubs` project has been officially archived by its maintainers. This means no further development, bug fixes, or compatibility updates are expected.","severity":"breaking","affected_versions":"0.2.0 and later"},{"fix":"Upgrade your Python environment to 3.8 or newer. Python 3.7 has reached its end-of-life.","message":"Version 0.2.0 of `django-filter-stubs` dropped support for Python 3.7. Attempting to use this version with Python 3.7 may lead to unexpected errors or missing type information.","severity":"breaking","affected_versions":"0.2.0"},{"fix":"If encountering type issues, manually inspect the `django-filter` source code or consider switching to the actively maintained `types-django-filter` package for up-to-date type definitions.","message":"Due to the project's archived status, the provided type stubs may become outdated quickly and might not accurately reflect the latest APIs or features of newer `django-filter` or Django versions. This can result in false positives or missed type errors in Mypy.","severity":"gotcha","affected_versions":"0.2.0 (all versions, due to lack of maintenance)"}],"env_vars":null,"search_vec":"'-484':11 '0.2.0':36 'archiv':42 'check':25 'compat':12 'current':33 'develop':49 'django':2,6,19,55 'django-filt':18 'django-filter-stub':1,5 'enabl':22 'expect':54 'filter':3,7,20 'librari':21 'like':28 'maintain':45 'mean':46 'mypi':29,56 'offici':41 'pep':10 'popular':17 'project':31 'provid':9 'releas':52 'static':23 'stub':4,8,14,59 'tool':27 'type':13,24,58,60 'type-stub':57 'updat':50 'version':35","created_at":"2026-04-16T17:00:26.108441+00:00","updated_at":"2026-04-16T17:00:26.108441+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":"0.1.3","cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/DavisRayM/django-filter-stubs","docs":null,"changelog":null,"pypi":"https://pypi.org/project/django-filter-stubs/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["type-stubs","web-framework"],"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}}