Skip to main content

A tool for formatting YAML files, yamlfmt from Google: https://github.com/google/yamlfmt

Project description

google-yamlfmt

A PyPI packaging repository for yamlfmt, making it easily accessible to the Python ecosystem.

Overview

This repository provides a Python package wrapper for Google's yamlfmt tool, enabling seamless integration with Python package managers and development workflows. The original yamlfmt is a powerful YAML formatter written in Go, and this package makes it available through PyPI for easier installation and use in Python projects.

Features

  • Easy Installation: Install via pip or any Python package manager
  • Python Ecosystem Integration: Works seamlessly with Python development workflows
  • Pre-commit Support: Perfect for use with pre-commit hooks
  • Cross-platform: Available on all platforms supported by the original yamlfmt

Installation

To install google-yamlfmt, ensure you have Python 3.9 or higher, then run:

pip install google-yamlfmt

Usage

After installation, you can format YAML files using the yamlfmt command:

yamlfmt <file_or_directory>

Examples:

# Format a single file
yamlfmt example.yaml

# Format multiple files
yamlfmt file1.yaml file2.yaml

# Format all YAML files in current directory
yamlfmt *.yaml

# Check if files need formatting (lint mode)
yamlfmt -lint example.yaml

For more advanced usage options and configuration, please refer to the original documentation or run yamlfmt -h.

Pre-commit Integration

To use with pre-commit, add this to your .pre-commit-config.yaml:

repos:
  - repo: https://github.com/PFCCLab/yamlfmt-pre-commit-mirror.git
    rev: v0.17.2
    hooks:
      - id: yamlfmt

About

This package is a redistribution of the original yamlfmt tool created by Google. All credit for the core functionality goes to the original maintainers. This packaging effort aims to make the tool more accessible to Python developers and integrate better with Python-based development workflows.

Contributing

Contributions are welcome! Please feel free to submit issues or pull requests to help improve this packaging and distribution effort.

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

google_yamlfmt-0.20.0.tar.gz (14.5 kB view details)

Uploaded Source

Built Distributions

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

google_yamlfmt-0.20.0-py3-none-win_arm64.whl (1.7 MB view details)

Uploaded Python 3Windows ARM64

google_yamlfmt-0.20.0-py3-none-win_amd64.whl (1.9 MB view details)

Uploaded Python 3Windows x86-64

google_yamlfmt-0.20.0-py3-none-musllinux_1_2_x86_64.whl (1.8 MB view details)

Uploaded Python 3musllinux: musl 1.2+ x86-64

google_yamlfmt-0.20.0-py3-none-musllinux_1_2_i686.whl (1.7 MB view details)

Uploaded Python 3musllinux: musl 1.2+ i686

google_yamlfmt-0.20.0-py3-none-musllinux_1_2_armv7l.whl (1.6 MB view details)

Uploaded Python 3musllinux: musl 1.2+ ARMv7l

google_yamlfmt-0.20.0-py3-none-musllinux_1_2_aarch64.whl (1.6 MB view details)

Uploaded Python 3musllinux: musl 1.2+ ARM64

google_yamlfmt-0.20.0-py3-none-manylinux_2_17_x86_64.whl (1.8 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ x86-64

google_yamlfmt-0.20.0-py3-none-manylinux_2_17_aarch64.whl (1.6 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ ARM64

google_yamlfmt-0.20.0-py3-none-macosx_11_0_arm64.whl (1.7 MB view details)

Uploaded Python 3macOS 11.0+ ARM64

google_yamlfmt-0.20.0-py3-none-macosx_10_12_x86_64.whl (1.8 MB view details)

Uploaded Python 3macOS 10.12+ x86-64

File details

Details for the file google_yamlfmt-0.20.0.tar.gz.

File metadata

  • Download URL: google_yamlfmt-0.20.0.tar.gz
  • Upload date:
  • Size: 14.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.17 {"installer":{"name":"uv","version":"0.9.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for google_yamlfmt-0.20.0.tar.gz
Algorithm Hash digest
SHA256 c6435d0cfb53eb6c329546fd277cb76977f3bd21abf104c01323e5bc3dd97cee
MD5 55bca512181ec8fabb7918d6ddd48b06
BLAKE2b-256 c25c8af5e45a26188f577c09c7b063009f3c82ccc57e6893d58f17e6f2bf14ff

See more details on using hashes here.

File details

Details for the file google_yamlfmt-0.20.0-py3-none-win_arm64.whl.

File metadata

  • Download URL: google_yamlfmt-0.20.0-py3-none-win_arm64.whl
  • Upload date:
  • Size: 1.7 MB
  • Tags: Python 3, Windows ARM64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.17 {"installer":{"name":"uv","version":"0.9.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for google_yamlfmt-0.20.0-py3-none-win_arm64.whl
Algorithm Hash digest
SHA256 6d6e2831966d805dbcda129d454dc30c3278e41a65e6bd8a4d2240932aaf6c04
MD5 6e6066e12e2bd2d288aac1182347f7d0
BLAKE2b-256 210e4e4b67fb3d809aa95035e58a574a7093a1821c8b75da9246229b146c49b5

See more details on using hashes here.

File details

Details for the file google_yamlfmt-0.20.0-py3-none-win_amd64.whl.

File metadata

  • Download URL: google_yamlfmt-0.20.0-py3-none-win_amd64.whl
  • Upload date:
  • Size: 1.9 MB
  • Tags: Python 3, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.17 {"installer":{"name":"uv","version":"0.9.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for google_yamlfmt-0.20.0-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 a8faf85ebcd7b77fa4985ea703cb534796c45656f72de4fead3ea49bf4c334c2
MD5 18695d13a60fb3f1717d5d05309a3b57
BLAKE2b-256 3dab4411c646593ba766edb7b63c8a77612bea33465a8a5f6315d7d16b071fce

See more details on using hashes here.

File details

Details for the file google_yamlfmt-0.20.0-py3-none-musllinux_1_2_x86_64.whl.

File metadata

  • Download URL: google_yamlfmt-0.20.0-py3-none-musllinux_1_2_x86_64.whl
  • Upload date:
  • Size: 1.8 MB
  • Tags: Python 3, musllinux: musl 1.2+ x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.17 {"installer":{"name":"uv","version":"0.9.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for google_yamlfmt-0.20.0-py3-none-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 e72df7be189bd9ae6cc30bac6da9518714eed96c205927b6eb4c459499ff7da7
MD5 1699bb12e4c6af318dbf20fa1ade393c
BLAKE2b-256 522cc3a369b8165b0b43bbaf9ad55f13d6781682d427f1989173024b677b62f3

See more details on using hashes here.

File details

Details for the file google_yamlfmt-0.20.0-py3-none-musllinux_1_2_i686.whl.

File metadata

  • Download URL: google_yamlfmt-0.20.0-py3-none-musllinux_1_2_i686.whl
  • Upload date:
  • Size: 1.7 MB
  • Tags: Python 3, musllinux: musl 1.2+ i686
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.17 {"installer":{"name":"uv","version":"0.9.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for google_yamlfmt-0.20.0-py3-none-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 45c4e58effdf7ad7f7a6d00567945c2173376eecc6c5425b7e181df58eea7711
MD5 241975f47effd5bdc2b92dfadb4b3fad
BLAKE2b-256 09555e830cd59371c93008b55a5be91d2b667482b2d79d52fe1fc9737a5d77f9

See more details on using hashes here.

File details

Details for the file google_yamlfmt-0.20.0-py3-none-musllinux_1_2_armv7l.whl.

File metadata

  • Download URL: google_yamlfmt-0.20.0-py3-none-musllinux_1_2_armv7l.whl
  • Upload date:
  • Size: 1.6 MB
  • Tags: Python 3, musllinux: musl 1.2+ ARMv7l
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.17 {"installer":{"name":"uv","version":"0.9.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for google_yamlfmt-0.20.0-py3-none-musllinux_1_2_armv7l.whl
Algorithm Hash digest
SHA256 a6153abbfd3f0a34886b1c4017a38c59e32308bc548538cc70108985c1cb069a
MD5 afa129013d0a0b1c331257682c835b4b
BLAKE2b-256 cb5d246018c386cba2606121f4877635808f1056e54115ff76666288a2b40134

See more details on using hashes here.

File details

Details for the file google_yamlfmt-0.20.0-py3-none-musllinux_1_2_aarch64.whl.

File metadata

  • Download URL: google_yamlfmt-0.20.0-py3-none-musllinux_1_2_aarch64.whl
  • Upload date:
  • Size: 1.6 MB
  • Tags: Python 3, musllinux: musl 1.2+ ARM64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.17 {"installer":{"name":"uv","version":"0.9.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for google_yamlfmt-0.20.0-py3-none-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 9994d3243a379aa7c2c66a0f0019a92a96a8213715c7c50c9217352bf34513bf
MD5 53b407bdb7bf136b2064223e04d3573e
BLAKE2b-256 749ff7461c8bc3547404221ddf4f351dc89458897a90c1758ac92e8cf6773f6a

See more details on using hashes here.

File details

Details for the file google_yamlfmt-0.20.0-py3-none-manylinux_2_17_x86_64.whl.

File metadata

  • Download URL: google_yamlfmt-0.20.0-py3-none-manylinux_2_17_x86_64.whl
  • Upload date:
  • Size: 1.8 MB
  • Tags: Python 3, manylinux: glibc 2.17+ x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.17 {"installer":{"name":"uv","version":"0.9.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for google_yamlfmt-0.20.0-py3-none-manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 c0c1268dbe6e8a88df17325eed7f741b3eb6c52c2c61fc0368e7f0b5be772597
MD5 e2927f389d194c5fa9767e08cd026277
BLAKE2b-256 d2dc5a5950ac1a46c865572a5c66c2b8ec4e63173ce62a1ea10e44e3efa62d6a

See more details on using hashes here.

File details

Details for the file google_yamlfmt-0.20.0-py3-none-manylinux_2_17_aarch64.whl.

File metadata

  • Download URL: google_yamlfmt-0.20.0-py3-none-manylinux_2_17_aarch64.whl
  • Upload date:
  • Size: 1.6 MB
  • Tags: Python 3, manylinux: glibc 2.17+ ARM64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.17 {"installer":{"name":"uv","version":"0.9.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for google_yamlfmt-0.20.0-py3-none-manylinux_2_17_aarch64.whl
Algorithm Hash digest
SHA256 0fd1daa5be2e453420e1c7bc9c02843a83352b1c69aa891d3c74ad9cc6bb020b
MD5 32188657ece68453c85287696328b2f2
BLAKE2b-256 bd01e0d836f9951310da4c991ae9afb43826d1c7b0e2f89950a7a37494856182

See more details on using hashes here.

File details

Details for the file google_yamlfmt-0.20.0-py3-none-macosx_11_0_arm64.whl.

File metadata

  • Download URL: google_yamlfmt-0.20.0-py3-none-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 1.7 MB
  • Tags: Python 3, macOS 11.0+ ARM64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.17 {"installer":{"name":"uv","version":"0.9.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for google_yamlfmt-0.20.0-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 76ebbe1f5384596fd730e7ac876ed9d7c399129afbbdb93663de3e013b278277
MD5 9ada19ae2b41f71b7eb53e7acaade8eb
BLAKE2b-256 2a9d077490b399a30945f60b0a575c71f7d3b3bc1cc6d024541a14faf4bc309f

See more details on using hashes here.

File details

Details for the file google_yamlfmt-0.20.0-py3-none-macosx_10_12_x86_64.whl.

File metadata

  • Download URL: google_yamlfmt-0.20.0-py3-none-macosx_10_12_x86_64.whl
  • Upload date:
  • Size: 1.8 MB
  • Tags: Python 3, macOS 10.12+ x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.17 {"installer":{"name":"uv","version":"0.9.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for google_yamlfmt-0.20.0-py3-none-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 70312171668cac6008bae7ceab190b2ec1ed6b545c6fc73142611d0092073766
MD5 068513dab953e5387c4d2a7c528cf947
BLAKE2b-256 d0b4e87f1818cd7902458d792f4192012f6c4de307cb9beaefe089bd19afaad3

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