psf

    psf/black

    #44 this week

    The uncompromising Python code formatter

    developer-tools
    autopep8
    code
    codeformatter
    formatter
    gofmt
    Python
    MIT
    41.9K stars
    2.9K forks
    41.9K GitHub watchers
    Updated Oct 8, 2026
    View on GitHub

    Build with Backblaze B2

    SDKs, agent skills, IDE extensions, and reference pipelines from Backblaze Labs. All open source.

    Explore Backblaze Labs

    Loading star history...

    Where it stands

    Rank, growth pace and release cadence relative to everything GStars tracks.

    Ranks #44 of 2,841 repositories GStars tracks this week (top 2%).

    1 release in the last 90 days, the latest 4 days ago, with 455 contributors on GitHub.

    Use Cases & Benefits

    • Formats Python code automatically to enforce a consistent and opinionated style.
    • Provides deterministic, minimal-diff formatting that saves time and mental energy by removing style debates.
    • Use for enforcing uniform code style across large Python projects to simplify code reviews.
    • Use for integrating automatic formatting into CI pipelines to ensure code style compliance before merging.
    • Use for formatting Jupyter Notebooks by installing with the jupyter extra for consistent notebook code style.

    Should you depend on it?

    License terms, project hygiene and risks, from GitHub metadata and GStars' snapshots.

    License

    MIT

    Permissive: commercial use, modification and redistribution are allowed with attribution.

    Community files

    • README: present
    • Contributing guide: present
    • Code of conduct: present

    Watch-outs

    No watch-outs from GStars' checks.

    General guidance from repository metadata, not legal advice. How we score

    From the README

    “Any color you like.”

    Black is the uncompromising Python code formatter. By using it, you agree to cede control over minutiae of hand-formatting. In return, Black gives you speed, determinism, and freedom from pycodestyle nagging about formatting. You will save time and mental energy for more important matters.

    Blackened code looks the same regardless of the project you're reading. Formatting becomes transparent after a while and you can focus on the content instead.

    Black makes code review faster by producing the smallest diffs possible.

    Try it out now using the Black Playground. Watch the PyCon 2019 talk to learn more.

    Black can be installed by running pip install black. It requires Python 3.9+ to run. If you want to format Jupyter Notebooks, install with pip install "black[jupyter]".

    If you can't wait for the latest hotness and want to install from GitHub, use:

    pip install git+https://github.com/psf/black

    Excerpt from the psf/black README on GitHub (MIT license). © its authors.Read the full README on GitHub

    Daily snapshots

    Stars gained per day, and how forks and open issues moved, from GStars' daily snapshots

    Oct 8: +7Oct 9: +3

    +152 stars over 87 days across 9 snapshot days; best day +7 on Oct 8.

    Forks

    2.9K+103

    Open issues

    264-28

    Compared with peers in Developer Tools

    Fastest-growing repositories GStars tracks in this cohort for the week of Oct 4, by 7-day star growth

    psf/black compared with Developer Tools repositories by stars, 7-day star growth, health score and last release
    RepositoryStars+7dHealthLast release
    DietrichGebert/ponytail162.8K+7.3K75today
    tt-a1i/archify81.8K+4.5K756 days ago
    affaan-m/ECC278.6K+4.2K6412 days ago
    OpenCut-app/OpenCut93.9K+2.3K5918 days ago
    FalkorDB/FalkorDB8.2K+1.6K75today
    psf/black41.9K+0754 days ago
    Category median93.9K+4.2K75—

    Discover Repositories

    Search across tracked repositories by name or description