{"categories":[{"label":"Database","url":"https://skillfed.io/packages/category/database/3"}],"enrichment":{"capability":"Builds and executes complex SQL queries dynamically in Django applications for database operations that Django's ORM doesn't handle well.","skillfed_tags":["django-orm-alternative","postgres-native","dynamic-queries"],"use_cases":["Build upsert (insert-or-update) operations that Django's ORM doesn't natively support","Construct WHERE clauses, JOINs, or GROUP BY logic dynamically based on user input or application state","Execute complex nested queries or subqueries that would be awkward to express in Django querysets","Perform batch database operations with custom logic","Generate reports or analytics queries with conditional aggregations"],"what_it_does":"django-query-builder is a Django library that lets you construct and execute SQL queries programmatically, filling gaps where Django's ORM and .raw() fall short. It's designed for developers who need to build queries dynamically\u2014where the structure itself changes based on runtime conditions\u2014rather than writing static raw SQL strings. The library mirrors SQL syntax closely in its API, so function calls map directly to SQL keywords, making the query construction process more transparent than Django querysets but requiring more SQL familiarity than the ORM.\n\nThe package sits between Django's high-level querysets (simple, safe, but limited) and raw SQL strings (flexible but not dynamic). It requires Django 5.2\u20136.0, Python 3.10\u20133.14, and Postgres 14+, and depends only on Django itself. It's actively maintained, has no known security vulnerabilities, and carries a permissive MIT license.","worth_installing":"Yes, if you work with Django and Postgres and regularly hit the limits of Django's ORM for complex or dynamic queries. The low install friction, active maintenance, permissive license, and zero known vulnerabilities make it a safe choice. Not necessary if your queries fit comfortably within Django querysets or if you're not using Postgres."},"id":"django-query-builder","links":{"html":"https://skillfed.io/packages/django-query-builder","md":"https://skillfed.io/packages/django-query-builder.md","pypi":"https://pypi.org/project/django-query-builder/"},"maintenance":{"status":"active"},"meta":{"latest_release":"2026-07-07","license_spdx":null,"license_treatment":"permissive","name":"django-query-builder","python_support":"supports_current","summary":"Build complex nested queries"},"popularity":{"monthly_downloads":231008,"position":9100,"tier":"top_15000"},"security":{"n_vulnerabilities":0},"version":"4.0.0"}
