{"categories":[{"label":"Database","url":"https://skillfed.io/packages/category/database/3"}],"enrichment":{"capability":"Generates parameterized SQL queries from Jinja2 templates, automatically binding variables to prevent SQL injection while supporting multiple parameter styles.","skillfed_tags":["sql-templating","injection-safe","reporting"],"use_cases":["Build dynamic reporting queries with conditional WHERE clauses based on user filters","Generate aggregation and GROUP BY queries that vary in structure depending on parameters","Create migration or bulk-update scripts using Jinja macros to reduce repetition","Support multi-table joins with optional conditions that an ORM cannot express as cleanly","Generate parameterized queries for multiple database drivers (PostgreSQL, MySQL, SQLite) using different placeholder styles"],"what_it_does":"JinjaSQL bridges Jinja2 templating and SQL generation, letting you write dynamic SQL queries using Jinja's full feature set\u2014conditionals, loops, macros\u2014while automatically extracting and binding parameters to prevent SQL injection. Instead of executing queries directly, it returns a parameterized query string (with %s, ?, :1, or other placeholders depending on your database driver) and a corresponding list or dictionary of bind values, which you then execute using your own database connection.\n\nThe package is designed for reporting, business intelligence, and complex queries where an ORM falls short\u2014aggregations, multi-table joins, and bulk operations with dynamic structure. It does not execute queries itself; you retain full control over the database driver and execution. It automatically applies the bind filter to all template variables to catch injection risks at template-compile time, and provides optional filters like `|inclause` for IN clauses and `|sqlsafe` for table/column names when you explicitly need dynamic SQL identifiers.","worth_installing":"Yes, if you need dynamic SQL templating with injection protection and your project can tolerate a dormant package. The core functionality is stable and the single Jinja2 dependency is mature. Not recommended if you require active maintenance, ongoing security updates, or support for cutting-edge Python versions\u2014use an ORM or a maintained query builder instead for those cases."},"id":"jinjasql","links":{"html":"https://skillfed.io/packages/jinjasql","md":"https://skillfed.io/packages/jinjasql.md","pypi":"https://pypi.org/project/jinjasql/"},"maintenance":{"status":"dormant"},"meta":{"latest_release":"2020-05-27","license_spdx":null,"license_treatment":"permissive","name":"jinjasql","python_support":"unspecified","summary":"Generate SQL Queries and Corresponding Bind Parameters using a Jinja2 Template"},"popularity":{"monthly_downloads":628046,"position":5678,"tier":"top_15000"},"security":{"n_vulnerabilities":0},"version":"0.1.8"}
