Skip to main content

Formater SQL written in Rust

Reason this release was yanked:

Issue with `Thread Pool` initialisation.

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.1-cp312-none-win_amd64.whl (2.4 MB view details)

Uploaded CPython 3.12Windows x86-64

sqlformater-1.0.1-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.1-cp312-cp312-macosx_11_0_arm64.whl (2.5 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

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

Uploaded CPython 3.11Windows x86-64

sqlformater-1.0.1-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.1-cp311-cp311-macosx_11_0_arm64.whl (2.5 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

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

Uploaded CPython 3.10Windows x86-64

sqlformater-1.0.1-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.1-cp310-cp310-macosx_11_0_arm64.whl (2.5 MB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

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

Uploaded CPython 3.9Windows x86-64

sqlformater-1.0.1-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.1-cp39-cp39-macosx_11_0_arm64.whl (2.5 MB view details)

Uploaded CPython 3.9macOS 11.0+ ARM64

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

Uploaded CPython 3.8Windows x86-64

sqlformater-1.0.1-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.1-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.1-cp312-none-win_amd64.whl.

File metadata

  • Download URL: sqlformater-1.0.1-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.1-cp312-none-win_amd64.whl
Algorithm Hash digest
SHA256 0bf1aa7aa9db3dcbff6e44abcd9bf6f27d063ce4232e2ac7405758b6ed35254b
MD5 c83dc030975f5478f09d2cc68903fe6c
BLAKE2b-256 ff058d5cacb27e888551314faa7f1b51d150d3aba558bb8cc1e59182929e21b0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sqlformater-1.0.1-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 8bb2c99fcc667d5c47d69ec7cb15fdc393a12cd81a38ced3f48281c65b21c323
MD5 2b84f728674ab2ed6d8a3a932ec80b21
BLAKE2b-256 4419258e275acecbfecb4a3879ac64cda8748ff3bd616e8fbadb12382cc98e03

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sqlformater-1.0.1-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 f6245460561667367fec0bad0fc23f0078fc7b83553b7e091ba42840cecc7d3c
MD5 2cdd9235ab8b9c17d9f9fb1d86655de9
BLAKE2b-256 d1a410f365eec2a3b6c74ea80d38c174a14ad2f6731f4d6daa4b3f6b083e70d9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: sqlformater-1.0.1-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.1-cp311-none-win_amd64.whl
Algorithm Hash digest
SHA256 aab00510cf6fe58212bcdef69f02407a7d9c9c7055ab0a22b1422e6800302f13
MD5 d8fc3ec442d59728d45d1244f038419c
BLAKE2b-256 3684b386bdaa919f8aa06d0a8497aa7de851e0cee388192d5895555f632019be

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sqlformater-1.0.1-cp311-cp311-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 917024910539d23eb29b51b52d7e2a3057be830cab2716b5579c4bbdd274ac5b
MD5 30f464c7b092aa77bebe9f02454028e0
BLAKE2b-256 86f647f627f1a46d7ec38783504cb2074854e688b4361ec6b1cf4e824464a3df

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sqlformater-1.0.1-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 fdd506013c6ee17a6189bdce9b03010722ae902f3151449d32fea51e0913f1c3
MD5 f9ee0871b46e40afb8b513ad04e793cf
BLAKE2b-256 1abe8e3aca200cdff290df5ed74f2dbd5035b5c59cbc796420dc48476695dd43

See more details on using hashes here.

File details

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

File metadata

  • Download URL: sqlformater-1.0.1-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.1-cp310-none-win_amd64.whl
Algorithm Hash digest
SHA256 9a8b7a05d1d6303df87bb5cb406092f4dc11a055340841de773ceec531915d9c
MD5 4d36acdd1ad90e6e12219538c2e2b595
BLAKE2b-256 dfca53bd6559784a7a93ccdc7217fca738fddba45500708589dc35396296c298

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sqlformater-1.0.1-cp310-cp310-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 10bd9441e4efdc069527b3d347f4e98aa6bae3488d67cf15f89ff565eb231673
MD5 75e7e884bb02d60fb9e5b738e841dbe3
BLAKE2b-256 36b126a0f371fdc29fb87366f9f5684c500056d2455a0aaa34def18eaf241645

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sqlformater-1.0.1-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 83d3d097c17e1c01c20d406b09a33e1d929d304a9ae3115f060042024fb458a5
MD5 a51156aee9ddf26ecf2898bdfd642063
BLAKE2b-256 703cd82e1f24d020e2ce8b45817166ae07e60e01e76da07c76ccf77002edf4e9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: sqlformater-1.0.1-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.1-cp39-none-win_amd64.whl
Algorithm Hash digest
SHA256 103657a0cb710deeaa49378bb27a2987bd23a5c8ced8132e20657edc959bdb42
MD5 f6a3873705f17e27f64984c77cb5fbae
BLAKE2b-256 d04dcae403b1478fbb46f62121120961c95b8d43adf560e006c4fef9b6760e5d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sqlformater-1.0.1-cp39-cp39-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 8468a03b4787d04ed23dde133f8e85a3cdbbd7a1b261728731da65ad36064d08
MD5 500278eb5b4fde22b08473e94b53db0e
BLAKE2b-256 e8812ed5070c1602e3db6f79e0726bef3a2b1a73b82137e09ef2ae61a4d2a897

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sqlformater-1.0.1-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 71b69585149e091efa0d3e6a95ea310d67f3cc925572b5fc24db2f27a0fd3d64
MD5 e6a9f9ef37ef97da93e82e2d9f3120c8
BLAKE2b-256 17dc6688a7e876eca9c7543e8b190888ccf637cbe0a33b2b141ac88bd0d444df

See more details on using hashes here.

File details

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

File metadata

  • Download URL: sqlformater-1.0.1-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.1-cp38-none-win_amd64.whl
Algorithm Hash digest
SHA256 6414e9696e981cb0c7c1f7dd3ea29e43c89d5fbb0124f072da64c880008a1687
MD5 867f41aec4f96ca3d19bc796ebe65550
BLAKE2b-256 1cc0410cee40f2f9a1f481a6672e99455bd3b75745b7c2a892bc154e47396506

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sqlformater-1.0.1-cp38-cp38-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 5c0704a9bf7a7f364b0113128b79cdaac0cf4df8ac77bb6b2622d4bfeb1d5ee9
MD5 be814a9ccd9f67bda1758f8112139f69
BLAKE2b-256 ed69a9e986d72b8d92a592fe826a22eeb0da5672b760a0e2e1f04e66734a50a4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sqlformater-1.0.1-cp38-cp38-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 01ccc46904ef02f95f1312e28d5767a826b703f7c6333bd7d58d29a325ca33ab
MD5 0f98c1ed95ac34b7d8315efbf74244b2
BLAKE2b-256 3209c7ebbf4452161ca5a8e71765639956fed708f544cc33822188b881d90169

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