$npx skillfedfor your agent

yapf

A formatter for Python code

Worth itPyPI Python ModulesReleased Nov 20249.2M downloads / mopermissive licensePure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — yapf-0.43.0-py3-none-any.whl
v0.43.0 · released 2024-11-14 · Python >=3.7 · 2 runtime deps: platformdirs, tomli

Yes. YAPF is actively maintained with low install friction, permissive licensing, and no known vulnerabilities. Install it if you want automatic, style-guide-compliant code formatting in your workflow—either as a standalone tool or integrated into your development environment.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires Python 3.7 or later (supports 3.7, 3.8, 3.9, 3.10, 3.11)
  • Low install friction with only two runtime dependencies (platformdirs and tomli).
  • Actively maintained with recent commits and a large repository following (13980 stars).

License · maintenance · safety

permissive license (permissive) — Apache License 2.0 is permissive and allows commercial use, modification, and distribution with minimal restrictions—you can use YAPF in proprietary projects as long as you include a copy of the license and note any changes you make.

last release 2024-11-14 (638 days) · last repo commit 2026-08-14 · 13,980 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 9,155,087 downloads/mo, #1,557 on PyPI

Verify before relying

pip install yapf

from yapf.yapflib.yapf_api import FormatCode

formatted_code, changed = FormatCode("f ( a = 1, b = 2 )")
print(formatted_code)
  • Whether YAPF's formatting output is deterministic across different Python versions or systems.
  • Performance characteristics when formatting very large files or entire codebases.
  • How well YAPF integrates with modern Python tooling in the same workflow.
Same gist for agents: .md · .json

What it is and what it does

YAPF is a Python code formatter that automatically rewrites code to match a configured style, based on the clang-format algorithm. Rather than enforcing rules line-by-line, it analyzes the entire code structure and calculates the best formatting that conforms to your chosen style. It supports predefined styles (pep8, google, yapf, facebook) and custom configurations via .style.yapf, setup.cfg, or pyproject.toml files.

You can use YAPF as a command-line tool to format files in place, print diffs, or run recursively over directories, or as a Python library by importing FormatCode and FormatFile from yapf.yapflib.yapf_api. It requires Python 3.7 or later and integrates with many editors via community plugins.

Use it for

  • Enforce consistent code style across a team or project without manual review of formatting details.
  • Integrate into a CI/CD pipeline to verify that code has been formatted correctly before merging.
  • Reformat legacy Python code to a modern style guide in bulk.
  • Use as a library in an IDE or editor plugin to format code on save or on demand.
  • Configure custom formatting rules for a project and apply them consistently to all Python files.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

Worth it

Yes.

YAPF is actively maintained with low install friction, permissive licensing, and no known vulnerabilities. Install it if you want automatic, style-guide-compliant code formatting in your workflow—either as a standalone tool or integrated into your development environment.

Install

yapf on PyPI

Before you install

Low install friction with only two runtime dependencies (platformdirs and tomli). Actively maintained with recent commits and a large repository following (13980 stars).

Requires Python 3.7 or later (supports 3.7, 3.8, 3.9, 3.10, 3.11)

License in practice

Apache License 2.0 is permissive and allows commercial use, modification, and distribution with minimal restrictions—you can use YAPF in proprietary projects as long as you include a copy of the license and note any changes you make.

Quickstart

pip install yapf

from yapf.yapflib.yapf_api import FormatCode

formatted_code, changed = FormatCode("f ( a = 1, b = 2 )")
print(formatted_code)

Verify before relying

  • Whether YAPF's formatting output is deterministic across different Python versions or systems.
  • Performance characteristics when formatting very large files or entire codebases.
  • How well YAPF integrates with modern Python tooling in the same workflow.

Package facts

Licensepermissive license permissive
Python supportSupports the current Python release >=3.7
Install frictionLow. Pure-Python wheel
Runtime dependencies
2 packages
platformdirstomli
MaintenanceActively maintained 638 days since the last release
Last repo commit
First released
Downloads9,155,087 / month, #1,557 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 4 - BetaEnvironment :: ConsoleIntended Audience :: DevelopersLicense :: OSI Approved :: Apache Software LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Software Development :: Libraries :: Python ModulesTopic :: Software Development :: Quality Assurance

Evidence: yapf-0.43.0-py3-none-any.whl

Tags

Capabilities
python code formatterautomatic code formattingstyle guide enforcementpep8 formatterpython code beautifierformat python filescode style automation
Topics
code-formatterstyle-enforcementcli-tool

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “pep8 formatter”

  • yapfYAPF automatically reformats Python code to conform to a specified…
  • autopep8autopep8 automatically reformats Python code to comply with PEP 8…
  • bashatebashate is a style checker for bash scripts that applies pep8-like…

Give your agent the search over MCP, or paste the wish link into any chat.

More Python Modules packages

idna Worth it
PyPI · Python Modules · released Jun 2026

Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.

Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.

BSD-3-Clausepure Python · 3.9+
1.8Bdownloads / mo
setuptools Worth it
PyPI · Python Modules · released Aug 2026

Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.

MITpure Python · 3.10+
1.6Bdownloads / mo
PyYAML Worth it
PyPI · Python Modules · released Sep 2025

PyYAML parses and emits YAML 1.1 data format, enabling serialization and deserialization of configuration files and Python objects to and from human-readable YAML text.

MITcompiled wheel · 3.8+
1.2Bdownloads / mo
pydantic Worth it
PyPI · Python Modules · released May 2026

Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.

MITpure Python · 3.9+
1.1Bdownloads / mo
annotated-types Worth it
PyPI · Python Modules · released Jul 2026

Provides reusable metadata objects for use with PEP-593 `typing.Annotated` to express common constraints like bounds, collection sizes, and predicates on types.

Install it if you use or build libraries that need to express type constraints in a standardized, inspectable way—or if you want to annotate your own types with…

MITpure Python · 3.10+
871.3Mdownloads / mo
typing-inspection Worth it
PyPI · Python Modules · released Aug 2026

Provides runtime tools to inspect and introspect Python type annotations, enabling programmatic examination of type hints at execution time.

MITpure Python · 3.10+
783.0Mdownloads / mo

See also autopep8 · reformat-gherkin · yamlfix · darker · ydiff · bashate · beautysh · pycodestyle · blacken-docs · djade