Skip to content

feat: expose the lower-level functionality in the python module#2572

Open
D3X wants to merge 2 commits into
quarylabs:mainfrom
D3X:python-interface
Open

feat: expose the lower-level functionality in the python module#2572
D3X wants to merge 2 commits into
quarylabs:mainfrom
D3X:python-interface

Conversation

@D3X
Copy link
Copy Markdown

@D3X D3X commented Apr 22, 2026

Exposes the Linter, enums, result types, etc. in the python module. Also adds a couple of convenience functions for typical use cases - lint and fix.
This will allow users to use the sqruff lib in a more programmer-friendly way than passing arguments to a CLI. Especially useful for formatting SQL stored in python strings as opposed to files.

D3X added 2 commits April 22, 2026 14:11
Add PyO3 bindings for the core sqruff API, including Linter,
FluffConfig, LintedFile, LintingResult, DialectKind, RuleGroups,
PlaceholderStyle, TemplaterKind, and Violation. Provides lint() and
fix() convenience functions in the Python module.
Covers DialectKind, RuleGroups, PlaceholderStyle, TemplaterKind,
FluffConfig (all constructors including from_file/from_path), Linter,
LintedFile, Violation, and the lint()/fix() convenience functions.
@D3X D3X changed the title Expose the lower-level functionality in the python module feat: expose the lower-level functionality in the python module Apr 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant