ufmt
Safe, atomic formatting with black and µsort
Decision gist · record as of 2026-08-14
Yes. ufmt solves a real problem—atomic, conflict-free formatting in CI workflows—with low install friction, active maintenance, no known vulnerabilities, and a permissive license. It is well-integrated into common development tools and suitable for teams that want safe, predictable formatting.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.10 or newer.
- Low friction: pure Python wheel with 8 runtime dependencies (black, click, libcst, moreorless, tomlkit, trailrunner, typing-extensions, usort).
- Active maintenance with recent commits; last release 187 days ago.
License · maintenance · safety
permissive license (permissive) — MIT license (permissive). No restrictions on commercial or private use; you may modify and distribute freely with attribution.
last release 2026-02-08 (187 days) · last repo commit 2026-05-18 · 110 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 2,337,651 downloads/mo, #3,127 on PyPI
Alternatives
Verify before relying
pip install ufmt
ufmt format myfile.py
ufmt check myfile.py
ufmt diff myfile.py- Whether pinning transitive dependencies (black, µsort) is necessary in practice to prevent unexpected formatting changes in CI workflows.
- Performance characteristics when formatting large codebases or many files at once.
What it is and what it does
ufmt is a Python code formatter that wraps black and µsort, running both tools in a single atomic operation. It formats files in-memory, first with µsort and then with black, before writing changes back to disk. This design prevents conflicts or intermediate states that can occur when running these tools separately in CI/CD pipelines.
The package is built for developers who want consistent, minimal diffs and safe handling without the risk of competing tools making conflicting changes. It integrates with GitHub Actions, pre-commit hooks, and Visual Studio Code, and supports checking, formatting, and diff-generation modes for different workflow needs.
Use it for
- Enforce consistent Python formatting in CI/CD without conflicts between separate formatting steps.
- Set up pre-commit hooks to automatically format code before commits with atomic changes.
- Validate that files are properly formatted in pull requests using the check or diff modes.
- Use as the default formatter in VS Code for automatic formatting on save.
- Pin transitive dependencies in requirements files to ensure reproducible formatting across environments.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
ufmt solves a real problem—atomic, conflict-free formatting in CI workflows—with low install friction, active maintenance, no known vulnerabilities, and a permissive license. It is well-integrated into common development tools and suitable for teams that want safe, predictable formatting.
Install
ufmt on PyPI
Before you install
Low friction: pure Python wheel with 8 runtime dependencies (black, click, libcst, moreorless, tomlkit, trailrunner, typing-extensions, usort). Active maintenance with recent commits; last release 187 days ago. Requires Python 3.10 or newer.
Requires Python 3.10 or newer.
License in practice
MIT license (permissive). No restrictions on commercial or private use; you may modify and distribute freely with attribution.
Quickstart
pip install ufmt
ufmt format myfile.py
ufmt check myfile.py
ufmt diff myfile.py
Verify before relying
- Whether pinning transitive dependencies (black, µsort) is necessary in practice to prevent unexpected formatting changes in CI workflows.
- Performance characteristics when formatting large codebases or many files at once.
Package facts
| License | permissive license permissive |
| Python support | Supports the current Python release >=3.10 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 8 packagesblackclicklibcstmoreorlesstomlkittrailrunnertyping-extensionsusort |
| Maintenance | Actively maintained 187 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 2,337,651 / month, #3,127 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseTopic :: UtilitiesTyping :: Typed |
Evidence: ufmt-2.9.1-py3-none-any.whl
Tags
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 › “atomic black and usort formatting”
- ufmtufmt combines black and µsort into a single atomic formatting pass,…
- flake8-blackA flake8 plugin that runs black's code style validation within the…
- pytest-blackA pytest plugin that runs black format checks on your code during…
Give your agent the search over MCP, or paste the wish link into any chat.
More Utilities packages
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.
Detects and normalizes text encoding from unknown or ambiguous sources, supporting all IANA character sets that Python's core library provides codecs for, with the ability to register custom codecs.
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.
Pluggy provides a plugin system that lets you define hook specifications and register implementations to be called in sequence, enabling extensible Python applications without tight coupling.
Install it if you're building an extensible application or framework.
Pygments is a syntax highlighter that colorizes source code and text in over 500 languages and formats, outputting to HTML, LaTeX, RTF, SVG, images, or ANSI terminal sequences.
Install it if you need to display or transform source code.
Six provides utility functions to write Python code that runs on both Python 2.7 and Python 3.3+, smoothing over language differences between the two versions.
See also usort · black · darker · mdformat-black · sort-lines · docstrfmt · pyink · reformat-gherkin · mdformat-ruff · isort