Skip to main content

Formater SQL written in Rust

Reason this release was yanked:

Deprecated

Project description

sqlformater

sqlformater is a command-line tool (CLI) built in Rust, designed to automatically format SQL scripts. It supports individual files or entire directories and allows customized configuration via settings files.

🚀 Getting Started

Install with Cargo :

cargo install --git https://github.com/LugolBis/sqlformater.git

Install with pip :

pip install sqlformater

Usage :

sqlformater <PATHS> [OPTIONS]

📂 : Specify the files or folders to format

You can provide one or more of the following:

  • One or more folder paths: formats all .sql files in the subdirectories.
  • One or more .sql files: formats specific individual files.
  • . or *: selects the current directory and all its subdirectories.

⚙️ Available Options

Option Description
-logs_path=<FOLDER_PATH>,
--logs_path=<FOLDER_PATH>
Specifies the folder where logs will be saved.
-settings_path=<PATH>,
--settings_path=<PATH>
Path to the configuration file or the folder that contains it.
-verbose,
--verbose
Enables verbose mode to display detailed execution information.
-status,
--status
Shows diagnostic information: settings, logs, etc.
-help,
--help
Displays general help.
-help-settings,
--help-settings
Displays information about available configuration settings.

📘 Examples

Format all SQL files in the current directory and subdirectories:

sqlformater .

Format two specific files:

sqlformater tutu/queries/init.sql tutu/queries/update_users.sql

Format all files in a folder with a specific config file:

sqlformater home/tutu/migrations --settings_path=./config/settings.json

Enable verbose mode:

sqlformater * --verbose

🔧 Configuration

You can customize the formatter's behavior via a configuration file. To see the available settings:

sqlformater --help-settings

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

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

sqlformater-1.0.0-cp312-none-win_amd64.whl (2.4 MB view details)

Uploaded CPython 3.12Windows x86-64

sqlformater-1.0.0-cp312-cp312-manylinux_2_34_x86_64.whl (3.0 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.34+ x86-64

sqlformater-1.0.0-cp312-cp312-macosx_11_0_arm64.whl (2.5 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

sqlformater-1.0.0-cp311-none-win_amd64.whl (2.4 MB view details)

Uploaded CPython 3.11Windows x86-64

sqlformater-1.0.0-cp311-cp311-manylinux_2_34_x86_64.whl (3.0 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.34+ x86-64

sqlformater-1.0.0-cp311-cp311-macosx_11_0_arm64.whl (2.5 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

sqlformater-1.0.0-cp310-none-win_amd64.whl (2.4 MB view details)

Uploaded CPython 3.10Windows x86-64

sqlformater-1.0.0-cp310-cp310-manylinux_2_34_x86_64.whl (3.0 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.34+ x86-64

sqlformater-1.0.0-cp310-cp310-macosx_11_0_arm64.whl (2.5 MB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

sqlformater-1.0.0-cp39-none-win_amd64.whl (2.4 MB view details)

Uploaded CPython 3.9Windows x86-64

sqlformater-1.0.0-cp39-cp39-manylinux_2_34_x86_64.whl (3.0 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.34+ x86-64

sqlformater-1.0.0-cp39-cp39-macosx_11_0_arm64.whl (2.5 MB view details)

Uploaded CPython 3.9macOS 11.0+ ARM64

sqlformater-1.0.0-cp38-none-win_amd64.whl (2.4 MB view details)

Uploaded CPython 3.8Windows x86-64

sqlformater-1.0.0-cp38-cp38-manylinux_2_34_x86_64.whl (3.0 MB view details)

Uploaded CPython 3.8manylinux: glibc 2.34+ x86-64

sqlformater-1.0.0-cp38-cp38-macosx_11_0_arm64.whl (2.5 MB view details)

Uploaded CPython 3.8macOS 11.0+ ARM64

File details

Details for the file sqlformater-1.0.0-cp312-none-win_amd64.whl.

File metadata

  • Download URL: sqlformater-1.0.0-cp312-none-win_amd64.whl
  • Upload date:
  • Size: 2.4 MB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.3

File hashes

Hashes for sqlformater-1.0.0-cp312-none-win_amd64.whl
Algorithm Hash digest
SHA256 4ffd926eb15b48597eec76aa4eb8dd00d5272806c0e433fa424346daccdf1499
MD5 94106668f2fe522c2138abef77514e0a
BLAKE2b-256 7a1d262f3a038444cefa7f368d1e19620af6d70e04196b2f52442d0e0b4d63c6

See more details on using hashes here.

File details

Details for the file sqlformater-1.0.0-cp312-cp312-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for sqlformater-1.0.0-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 212e0f0e12595bf71c66cab85fb1ed23139041449cb4019298c205c7876d65d3
MD5 632083dd24cb84b3dff8954a14c52945
BLAKE2b-256 12db53ddf6327cb80d422ade60058b6421895b489739790a5cb4cc1b0aa4e249

See more details on using hashes here.

File details

Details for the file sqlformater-1.0.0-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for sqlformater-1.0.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 dd13dcbddb34c82c0f133198a230950184509ed663be60d9abb0441fd65c9bbe
MD5 1a43e63a203b02d94a4d46a848db79f6
BLAKE2b-256 558aa8e6fc6c35159b4f91cb021379dbab5dc2c7c9723f4cf25b07ebfcc904ab

See more details on using hashes here.

File details

Details for the file sqlformater-1.0.0-cp311-none-win_amd64.whl.

File metadata

  • Download URL: sqlformater-1.0.0-cp311-none-win_amd64.whl
  • Upload date:
  • Size: 2.4 MB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.3

File hashes

Hashes for sqlformater-1.0.0-cp311-none-win_amd64.whl
Algorithm Hash digest
SHA256 95a40409107424aa5c5c82df5b176c8499eee8e975576fdb6dfa865b5010639d
MD5 04348439dd04f3368906235463ec1205
BLAKE2b-256 4c2a80bb956399e9ab5e2d93c2fded5887768f84184dc96ede39a6c24c9230fc

See more details on using hashes here.

File details

Details for the file sqlformater-1.0.0-cp311-cp311-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for sqlformater-1.0.0-cp311-cp311-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 382a165e57ce8f26653b0e0fd20885eb08f4302b17f66471bbc3ba8522074e07
MD5 e28399545b30b84142c898c21234e636
BLAKE2b-256 8356e3b6c37b550d10dbc24b33370db4bf9ec8b0b794a6c90def62130397571a

See more details on using hashes here.

File details

Details for the file sqlformater-1.0.0-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for sqlformater-1.0.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 7f7d9718710adf9a26bfb732734fc927ac868b9497fdfce47e06cec64f0bc5a5
MD5 638e0f0fa41c94b72e6954ac3ba3f2c8
BLAKE2b-256 a9e7953b6e117895603910770a30e71377dee04e01351bfff1704a1a5ebb06b7

See more details on using hashes here.

File details

Details for the file sqlformater-1.0.0-cp310-none-win_amd64.whl.

File metadata

  • Download URL: sqlformater-1.0.0-cp310-none-win_amd64.whl
  • Upload date:
  • Size: 2.4 MB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.3

File hashes

Hashes for sqlformater-1.0.0-cp310-none-win_amd64.whl
Algorithm Hash digest
SHA256 056fb23a9c1abc97cd8c09a5deb010bda02a9d01814e88b103df31429c9643b2
MD5 b119b3cb6248ddd2199c5bb2dcc0bb44
BLAKE2b-256 8e2ae19a5131ec9447c4a3c823014183efa1452723d33906b04cfa7513077d73

See more details on using hashes here.

File details

Details for the file sqlformater-1.0.0-cp310-cp310-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for sqlformater-1.0.0-cp310-cp310-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 1c2ab4466de9dd4fb344069d163220b6045bff647d7c1a88e453ef954e0d04ca
MD5 6a6c2207c2be2a8aebac1fbf142693d1
BLAKE2b-256 41f146c950b562f6565ff40528a124e3f00029eedc8a2ee6a1f029f37f6613a1

See more details on using hashes here.

File details

Details for the file sqlformater-1.0.0-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for sqlformater-1.0.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 18bcfdcc8bb103b1a7401b83ed3588262c87108a22fdbd525be06e4338339373
MD5 861c8c3cf8bcc1118425d20796bbf367
BLAKE2b-256 9308b6b2ce1dfbdee54daa54a9283d1202dd7bea121dfc53b45bf5ce01077aac

See more details on using hashes here.

File details

Details for the file sqlformater-1.0.0-cp39-none-win_amd64.whl.

File metadata

  • Download URL: sqlformater-1.0.0-cp39-none-win_amd64.whl
  • Upload date:
  • Size: 2.4 MB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.3

File hashes

Hashes for sqlformater-1.0.0-cp39-none-win_amd64.whl
Algorithm Hash digest
SHA256 4fd182fc6404744a153890d04cbfa7b7bd354128fdea6438dad5b461913b6f2b
MD5 586d5249bf52e0331633a391132044c6
BLAKE2b-256 42f31462d75c6aad25364c017ade9e0ac30cdb53cc4ccc8361c7e4c2995a5381

See more details on using hashes here.

File details

Details for the file sqlformater-1.0.0-cp39-cp39-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for sqlformater-1.0.0-cp39-cp39-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 74df439286ff9a17ed4a034b75916a4bbacf460af32d7bbdeb34e985acaf13aa
MD5 c3e8fc16a17ff2bd98635e12f3058776
BLAKE2b-256 d0d1387e4139b405f9916b17aac4ec84b5cde2cd057aa4bbc5956579bf6bea67

See more details on using hashes here.

File details

Details for the file sqlformater-1.0.0-cp39-cp39-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for sqlformater-1.0.0-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 536328085c101267a2ceba842f60b8f578bc58830274d08043bd2a84e320f627
MD5 dcf930f69eb791740f551d1cef740cc6
BLAKE2b-256 fe4ad86a40cc281ad55bc822e8dedcdadeff29a952f5e74e7a5869f6464006b7

See more details on using hashes here.

File details

Details for the file sqlformater-1.0.0-cp38-none-win_amd64.whl.

File metadata

  • Download URL: sqlformater-1.0.0-cp38-none-win_amd64.whl
  • Upload date:
  • Size: 2.4 MB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.3

File hashes

Hashes for sqlformater-1.0.0-cp38-none-win_amd64.whl
Algorithm Hash digest
SHA256 f2eae5af78502a755ecfeb095f7a165f81ebf7c23a565f243153ddc130786735
MD5 f1f394711f33777d17929fe51b19d991
BLAKE2b-256 7513f9a9d018ce46d0e24b695b23a6c61ed76409e2fa3c19aedbc47bca06240f

See more details on using hashes here.

File details

Details for the file sqlformater-1.0.0-cp38-cp38-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for sqlformater-1.0.0-cp38-cp38-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 748eca25ed08b475935c23a291dd1c48ba5e5a052fcca5c1ff3b90326b70ba42
MD5 62c5a71d4a38f1a3054822f687188125
BLAKE2b-256 1e094e58b264a45582d13f8143e1ad8263e2b0116f90f5e178445f17a9bcea06

See more details on using hashes here.

File details

Details for the file sqlformater-1.0.0-cp38-cp38-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for sqlformater-1.0.0-cp38-cp38-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 b2639e7dfdd8346ff61c1b958f018ce28b51142c7dc02d1303c2abf8be4898d0
MD5 073ef1534c381a0c62cb79b8f43d0313
BLAKE2b-256 b9a8d8693597412f7b9030e4a301435656da906ee42c57f70bf0d1358adaad35

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