Skip to main content

SQLFluff for python script

Project description

sqlfluff_py

SQLFluff for python script

[!WARNING] This project is in alpha stage. Using the tool may cause unreversable changes in python code.

Installation

$ pip install sqlfluff-py

Usage

You can use CLI tool from terminal.

When using the tool, you must specify the following:

  • -i for input file
  • -d for dialect (See sqlfluff's documentation for available dialects)
  • -p for regex pattern to identify variables for query
$ sqlfluff-py -i your_script.py -d ansi -p query

Optionally you can specify -o for output file, in case you would like to keep the original file. By default the input file will be overwritten.

$ sqlfluff-py -i your_script.py -d ansi -p query -o fixed_script.py

TODO

  • Handle tokens' position properly
  • Read configuration from pyproject.toml
  • Make yaml for pre-commit

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sqlfluff_py-1.0.0a1.tar.gz (8.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sqlfluff_py-1.0.0a1-py3-none-any.whl (8.9 kB view details)

Uploaded Python 3

File details

Details for the file sqlfluff_py-1.0.0a1.tar.gz.

File metadata

  • Download URL: sqlfluff_py-1.0.0a1.tar.gz
  • Upload date:
  • Size: 8.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for sqlfluff_py-1.0.0a1.tar.gz
Algorithm Hash digest
SHA256 43c31f9a9560e7f8ac90137a9652cf832fc5af6c0b0bb7b6d6ce1c2ce8924943
MD5 f3dd3d684c4552d29e2b68d17f1fb59f
BLAKE2b-256 5b0d5c26ea123bb717c40e60da3e02852bf5ef96f8d12d21a61e24e124ec6464

See more details on using hashes here.

File details

Details for the file sqlfluff_py-1.0.0a1-py3-none-any.whl.

File metadata

  • Download URL: sqlfluff_py-1.0.0a1-py3-none-any.whl
  • Upload date:
  • Size: 8.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for sqlfluff_py-1.0.0a1-py3-none-any.whl
Algorithm Hash digest
SHA256 8027143217b14724383d6d076b5b43caa2cb94978550a90235bd42a7f300a267
MD5 b74c5d4220f48e5b5323aa214849aef0
BLAKE2b-256 98e0d358f670827188aaae7147cac1ad1f310bd0476398be21cd5e5196d25c70

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page