black
The uncompromising code formatter.
Decision gist · record as of 2026-08-14
Yes. Black is production-stable, actively maintained, has zero known vulnerabilities, and installs with low friction. It solves a real problem (formatting consistency) with a deterministic, widely-trusted approach. The opinionated design and minimal configuration make it suitable for teams wanting to eliminate formatting decisions entirely.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.10 or later to run.
- Low friction: pure Python wheel with 8 lightweight runtime dependencies (click, packaging, pathspec, platformdirs, and others).
- Active maintenance with last commit 2026-08-10 and stable status since initial release in 2018.
License · maintenance · safety
MIT (permissive) — MIT license (permissive): you can use, modify, and distribute Black freely in commercial and private projects with minimal restrictions.
last release 2026-05-18 (88 days) · last repo commit 2026-08-10 · 41,802 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 179,909,313 downloads/mo, #228 on PyPI
Alternatives
Verify before relying
pip install black
python -m black {source_file_or_directory}- Performance characteristics on large codebases or whether --fast mode meaningfully improves speed.
- Compatibility with Jupyter Notebooks when installed with the [jupyter] extra.
What it is and what it does
Black is a deterministic Python code formatter that takes control of formatting minutiae away from developers. It parses entire Python files, applies a fixed set of opinionated style rules (PEP 8 compliant), and rewrites them in place. The formatter produces identical output regardless of the input project, making code review diffs smaller and eliminating debates over formatting style. Black includes an AST safety check to verify that reformatted code remains semantically equivalent to the original.
The tool is designed around sensible defaults with minimal configuration options—the philosophy is that you should not need to configure anything to get started. It supports modern Python syntax across versions 3.10 through 3.15, and can optionally format Jupyter Notebooks when installed with the [jupyter] extra. Black is widely adopted by large open-source projects and organizations, and has remained stable since its early releases with formatting changes reserved mainly for bug fixes and new syntax support.
Use it for
- Enforce consistent code style across a team or project without manual code review of formatting.
- Reduce code review time by producing minimal diffs that focus on logic rather than style.
- Integrate into CI/CD pipelines to automatically reject or reformat non-compliant code.
- Migrate an existing codebase to a uniform style without hand-editing thousands of lines.
- Use as a pre-commit hook to format code before commits are accepted.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
Black is production-stable, actively maintained, has zero known vulnerabilities, and installs with low friction. It solves a real problem (formatting consistency) with a deterministic, widely-trusted approach. The opinionated design and minimal configuration make it suitable for teams wanting to eliminate formatting decisions entirely.
Install
black on PyPI
Before you install
Low friction: pure Python wheel with 8 lightweight runtime dependencies (click, packaging, pathspec, platformdirs, and others). Active maintenance with last commit 2026-08-10 and stable status since initial release in 2018.
Requires Python 3.10 or later to run.
License in practice
MIT license (permissive): you can use, modify, and distribute Black freely in commercial and private projects with minimal restrictions.
Quickstart
pip install black
python -m black {source_file_or_directory}
Verify before relying
- Performance characteristics on large codebases or whether --fast mode meaningfully improves speed.
- Compatibility with Jupyter Notebooks when installed with the [jupyter] extra.
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release >=3.10 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 8 packagesclickmypy-extensionspackagingpathspecplatformdirspytokenstomlityping-extensions |
| Maintenance | Actively maintained 88 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 179,909,313 / month, #228 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/StableEnvironment :: ConsoleIntended Audience :: DevelopersOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.15Topic :: Software Development :: Libraries :: Python ModulesTopic :: Software Development :: Quality Assurance |
Evidence: black-26.5.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 › “automatic code formatting”
- blackBlack reformats Python source code to a consistent style by parsing…
- jupyterlab-code-formatterA JupyterLab plugin that integrates code formatters directly into the…
- yapfYAPF automatically reformats Python code to conform to a specified…
Give your agent the search over MCP, or paste the wish link into any chat.
More Python Modules 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.
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.
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.
Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.
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…
Provides runtime tools to inspect and introspect Python type annotations, enabling programmatic examination of type hints at execution time.
See also darker · flake8-black · pyink · blacken-docs · ufmt · mdformat-black · pycodestyle · docstrfmt · reformat-gherkin · ruff-format