Skip to main content

An uncompromising SQL query formatter.

Project description

SQLFMT

SQLFMT - An uncompromising SQL query formatter.

PyPI Latest Release Package Status Code style: black Imports: isort

SQLFMT is an uncompromising SQL query formatter, which provides one and only one way to format the SQL query. Our goal is to make code reviews faster by producing the smallest diffs possible. You will save time and mental energy on more important matters.

Please note this project is still in the planning stage and everything may be changed in the future.

How to install SQLFMT?

You can install SQLFMT from Python Package Index:

pip install sqlfmt

How to use SQLFMT?

Given a SQL file, you can simply use the following command to format it:

sqlfmt path/to/file.sql

You can install completion for a specfic shell:

sqlfmt --install-completion bash

You can also run the following command to find more other options:

sqlfmt --help

How does SQLFMT work?

It formats your SQL code in place.

For example, if you have a file containing the following SQL code:

SeLEct  1, blah as  fOO  from myTable

after running SQLFMT, the content of that file will become:

SELECT
  1,
  blah AS foo
FROM mytable

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

sqlfmt-0.0.3.tar.gz (3.0 kB view details)

Uploaded Source

Built Distribution

sqlfmt-0.0.3-py3-none-any.whl (3.5 kB view details)

Uploaded Python 3

File details

Details for the file sqlfmt-0.0.3.tar.gz.

File metadata

  • Download URL: sqlfmt-0.0.3.tar.gz
  • Upload date:
  • Size: 3.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.2

File hashes

Hashes for sqlfmt-0.0.3.tar.gz
Algorithm Hash digest
SHA256 ed7987c12f9f2471382dfbf9fb2f70ca6d19efc8c7db97c95920289f3b7ac4ea
MD5 3c85077b77533b990adc9bed1412338a
BLAKE2b-256 5229573f35bd9417bc84df244785fe36f0b855d045c7a66856b4a4bddc70cf65

See more details on using hashes here.

File details

Details for the file sqlfmt-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: sqlfmt-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 3.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.2

File hashes

Hashes for sqlfmt-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 d43016d0e89d689e032bb18a48b03fd236c93e94401ddef9cd4f19e28593f7b8
MD5 d86c44a5080a1e3e1c66d63c444cca31
BLAKE2b-256 d108e627ace5ea30606110b33ee19e5314765bce8024f60132f7e12674c0a667

See more details on using hashes here.

Supported by

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