Skip to main content

Python wrapper around invoking shfmt (https://github.com/mvdan/sh)

Project description

PyPI version Supported Python versions Downloads License pre-commit.ci status

shfmt-py

Python-installable wrapper for shfmt, the shell script formatter.

Internally this package downloads the pre-built shfmt binary for your platform at install time.

Modeled after shellcheck-py, adapted for shfmt.

Installation

pip install shfmt-py

Usage

CLI

After installation, the shfmt binary is available on your PATH (or shfmt.exe on Windows).

As pre-commit hook

See pre-commit for instructions.

Sample .pre-commit-config.yaml:

- repo: https://github.com/maxwinterstein/shfmt-py
  rev: v3.13.0.1
  hooks:
    - id: shfmt

FAQ

Q: It won't get updated via e.g. Renovate Bot

A: See https://github.com/shfmt-py/update-via-renovate .

Q: I get something like SSL: CERTIFICATE_VERIFY_FAILED on macOS

A: Install certificates with e.g.: "/Applications/Python 3.9/Install Certificates.command". See here or here for a solution.

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

shfmt_py-3.13.0.3.tar.gz (9.7 kB view details)

Uploaded Source

Built Distributions

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

shfmt_py-3.13.0.3-py2.py3-none-win_amd64.whl (1.4 MB view details)

Uploaded Python 2Python 3Windows x86-64

shfmt_py-3.13.0.3-py2.py3-none-manylinux2014_x86_64.whl (1.3 MB view details)

Uploaded Python 2Python 3

shfmt_py-3.13.0.3-py2.py3-none-manylinux2014_aarch64.whl (1.2 MB view details)

Uploaded Python 2Python 3

shfmt_py-3.13.0.3-py2.py3-none-macosx_11_0_arm64.whl (1.2 MB view details)

Uploaded Python 2Python 3macOS 11.0+ ARM64

shfmt_py-3.13.0.3-py2.py3-none-macosx_10_9_x86_64.whl (1.3 MB view details)

Uploaded Python 2Python 3macOS 10.9+ x86-64

File details

Details for the file shfmt_py-3.13.0.3.tar.gz.

File metadata

  • Download URL: shfmt_py-3.13.0.3.tar.gz
  • Upload date:
  • Size: 9.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for shfmt_py-3.13.0.3.tar.gz
Algorithm Hash digest
SHA256 9e3de4e39657f3d9ede7d74cc4383bd462b569646b194eec4e2d8a25dcb181ce
MD5 268c21b2946c0bc9cb0a732de22bd2c9
BLAKE2b-256 c2d9b10c7de5f24b1e74062d2d0e6b0449526057127223d188510f75a0b9c76c

See more details on using hashes here.

File details

Details for the file shfmt_py-3.13.0.3-py2.py3-none-win_amd64.whl.

File metadata

File hashes

Hashes for shfmt_py-3.13.0.3-py2.py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 dc66745ab71346ffd405f263ec99ec3c72d91cd9a4b78ee98376fc2d3cb45368
MD5 f7d216a02de55f647bbc0cea79f13053
BLAKE2b-256 c8978ba25d90129aa291958005ba18a8456e33f1c34ee9aa2cd304e7dfc0f571

See more details on using hashes here.

File details

Details for the file shfmt_py-3.13.0.3-py2.py3-none-manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for shfmt_py-3.13.0.3-py2.py3-none-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 af9d8da5c180b71df6e1811f23e9e9efbba70cb34323931c77fc47393d33c3d6
MD5 76dc1263536872efbe0b215c9757cacc
BLAKE2b-256 79ac259b51b46629a3f8e2d2141f268d5b3c350747b1a38406c894f892293229

See more details on using hashes here.

File details

Details for the file shfmt_py-3.13.0.3-py2.py3-none-manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for shfmt_py-3.13.0.3-py2.py3-none-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 8c30a1e9f78dfb5d8a5410135eae5a6c7a1aa7651957425637b60abee7f4d959
MD5 8de5377f1e055802eab400fd3e100b58
BLAKE2b-256 c3b560ff5140ba442e3ff3c2d010ac917f09e7fe7fc1dbf3f87c7ff88780f840

See more details on using hashes here.

File details

Details for the file shfmt_py-3.13.0.3-py2.py3-none-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for shfmt_py-3.13.0.3-py2.py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 60180da9a5988f4940639474878e7436275cff07bf29f7aeed13fa0d4948c177
MD5 c4350d4bc2f697e48d83cc7ae68fcad4
BLAKE2b-256 95e6fec40f24aa72bb1f550f0d1aa9b522dea2d7aace38b2067c277143e57492

See more details on using hashes here.

File details

Details for the file shfmt_py-3.13.0.3-py2.py3-none-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for shfmt_py-3.13.0.3-py2.py3-none-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 1d117f21684974b911af650f51ce78705bceff4bdcd59f5dc772c92b518a7b18
MD5 fc16a25f4a08ef9025dde4044273daf1
BLAKE2b-256 2bd505324fff0dd72a1516d9c279f1fd74ed80fa241e3b9d757f9e726ed88b35

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