{"categories":[{"label":"Python Modules","url":"https://skillfed.io/packages/category/software-development-libraries-python-modules/4"},{"label":"Utilities","url":"https://skillfed.io/packages/category/utilities/2"},{"label":"Database","url":"https://skillfed.io/packages/category/database"}],"enrichment":{"capability":"Converts SQL queries between different parameter styles (named, ordinal, numeric, and dollar-sign variants) to match what your database driver supports.","skillfed_tags":["parameter-conversion","db-api-2.0"],"use_cases":["Use it to write portable database code that works with drivers supporting only qmark or format styles while using named parameters in your application.","Use it to safely expand tuples into SQL IN clauses without manual string concatenation or SQL injection risk.","Use it to convert batch operations (executemany) by formatting multiple parameter sets at once with formatmany().","Use it to migrate code between database systems that prefer different parameter conventions (e.g., Oracle to SQL Server).","Use it to strip SQL comments before parameter expansion to avoid accidentally matching variable-like strings in comments."],"what_it_does":"sqlparams is a utility for translating SQL parameter styles between formats. Many Python database drivers (like pyodbc) support only one parameter style\u2014typically ordinal qmark (?) or format (%)\u2014but developers often prefer named parameters (:name) for readability and safety. This package bridges that gap by accepting a query and parameters in any style and converting them to the style your driver expects.\n\nYou create an SQLParams instance specifying the input and output styles, then call format() or formatmany() to convert queries and their parameter dictionaries. It handles scalar values, tuples (for SQL IN clauses), and batch operations. The package supports seven parameter styles: qmark, numeric, named, format, pyformat, numeric_dollar, and named_dollar, plus Oracle and SQL Server variants.","worth_installing":"Yes. sqlparams solves a real compatibility problem with minimal friction: it's a pure-Python package with no dependencies, supports current Python versions (3.8\u20133.13), carries no known vulnerabilities, and uses a permissive MIT license. Its dormant maintenance status is not a concern for a stable utility with a narrow, well-defined scope. Install it if you need to bridge parameter style mismatches between your code and your database driver."},"id":"sqlparams","links":{"html":"https://skillfed.io/packages/sqlparams","md":"https://skillfed.io/packages/sqlparams.md","pypi":"https://pypi.org/project/sqlparams/"},"maintenance":{"status":"dormant"},"meta":{"latest_release":"2025-01-25","license_spdx":null,"license_treatment":"permissive","name":"sqlparams","python_support":"supports_current","summary":"Convert between various DB API 2.0 parameter styles."},"popularity":{"monthly_downloads":6777211,"position":1851,"tier":"top_5000"},"security":{"n_vulnerabilities":0},"version":"6.2.0"}
