black
The uncompromising code formatter.
Install
black on PyPI
pip
pip install blackuv
uv add blackpoetry
poetry add blackPackage facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 8 — click, mypy-extensions, packaging, pathspec, platformdirs, pytokens, tomli, typing-extensions |
| Maintenance | actively maintained — 87 days since the last release |
| Last repo commit | |
| First released | |
| Popularity | one of the top 1,000 most-downloaded packages on PyPI (30-day window, as of 2026-08-13) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-13) |
Evidence: black-26.5.1-py3-none-any.whl
Keywords: automation, autopep8, formatter, gofmt, pyfmt, rustfmt, yapf
About black
from the package's own PyPI description — quoted content, verbatim
<h2 align="center">The Uncompromising Code Formatter</h2>
<p align="center"> <a href="https://github.com/psf/black/actions"><img alt="Actions Status" src="https://github.com/psf/black/workflows/Test/badge.svg"></a> <a href="https://black.readthedocs.io/en/stable/?badge=stable"><img alt="Documentation Status" src="https://readthedocs.org/projects/black/badge/?version=stable"></a> <a href="https://coveralls.io/github/psf/black?branch=main"><img alt="Coverage Status" src="https://coveralls.io/repos/github/psf/black/badge.svg?branch=main"></a> <a href="https://github.com/psf/black/blob/main/LICENSE"><img alt="License: MIT" src="https://black.readthedocs.io/en/stable/_static/license.svg"></a> <a href="https://pypi.org/project/black/"><img alt="PyPI" src="https://img.shields.io/pypi/v/black"></a> <a href="https://pypi.org/project/black"><img alt="Supported Python Versions" src="https://img.shields.io/pypi/pyversions/black?color=brightgreen"></a> <a href="https://pepy.tech/project/black"><img alt="Downloads"...
AI interpretation — verify before relying
AI-generated interpretation of the package facts above; every digit, version, license, or vulnerability id it cites is grounded in the facts already shown on this page
Black is an opinionated Python code formatter that automatically reformats entire files to enforce a consistent, deterministic style, eliminating manual formatting decisions and code review friction.
Low friction installation with 8 lightweight runtime dependencies; actively maintained with a recent release 87 days ago. The wheel distribution and pure-Python dependencies ensure straightforward setup across platforms.
MIT license permits unrestricted use, modification, and distribution in both open-source and commercial projects with minimal obligations—only attribution required.
Usage
pip install black
python -m black {source_file_or_directory}
Requires Python 3.10 or later to run.
Verdict: Black is a mature, actively maintained formatter with zero known vulnerabilities, permissive MIT licensing, and minimal install friction. The opinionated design trades configuration flexibility for determinism and reduced code review overhead—ideal for teams prioritizing consistency over customization.
Needs verification
- Whether the 8 runtime dependencies (click, mypy-extensions, packaging, pathspec, platformdirs, pytokens, tomli, typing-extensions) have their own known vulnerabilities or maintenance gaps.
- Performance characteristics and memory footprint when formatting very large codebases or projects with thousands of files.
- Real-world adoption scope and production usage patterns across major projects.
Similar packages
permissive · top 1,000 on PyPI
ruffpermissive · top 1,000 on PyPI
cattrspermissive · top 1,000 on PyPI
attrspermissive · top 100 on PyPI
rich-toolkitpermissive · top 1,000 on PyPI
pylintcopyleft · top 1,000 on PyPI
virtualenvpermissive · top 100 on PyPI
colorlogpermissive · top 1,000 on PyPI
rignorepermissive · top 1,000 on PyPI
diff-coverpermissive · top 1,000 on PyPI