Python Formatter

Open-source Python projects categorized as Formatter

Top 18 Python Formatter Projects

  • black

    The uncompromising Python code formatter

    Project mention: Are there any good syntax or style checkers recommended? | | 2023-05-19
  • yapf

    A formatter for Python files

    Project mention: Front page news headline scraping data engineering project | | 2023-05-13

    Use yapf to format code ->


    ONLYOFFICE Docs — document collaboration in your environment. Powerful document editing and collaboration in your app or environment. Ultimate security, API and 30+ ready connectors, SaaS or on-premises

  • isort

    A Python utility / library to sort imports.

    Project mention: Improve your Django Code with pre-commit | | 2023-04-05

    repos: ... pre-commmit stuff ... black stuff - repo: rev: 5.12.0 hooks: - id: isort name: isort (python)

  • autopep8

    A tool that automatically formats Python code to conform to the PEP 8 style guide.

    Project mention: I have some legacy code which has been ported to Python 3 recently, but is still quite ugly. What are recommended points for coding style to improve it and make it more modern/pleasant in style? | | 2022-11-15
  • autoflake

    Removes unused imports and unused variables as reported by pyflakes

    Project mention: Improve your Django Code with pre-commit | | 2023-04-05

    Ruff can be used to replace Flake8 (plus dozens of plugins), isort, pydocstyle, yesqa, eradicate, pyupgrade, and autoflake, all while executing tens or hundreds of times faster than any individual tool.

  • best-of-python-dev

    🏆 A ranked list of awesome python developer tools and libraries. Updated weekly.

  • docformatter

    Formats docstrings to follow PEP 257

  • Sonar

    Write Clean Python Code. Always.. Sonar helps you commit clean code every time. With over 225 unique rules to find Python bugs, code smells & vulnerabilities, Sonar finds the issues while you focus on the work.

  • blue

    The slightly less uncompromising Python code formatter.

    Project mention: Which code formatter do you use? | | 2022-12-21

    I use blue - a fork of black. I set the line lengths (much) longer.

  • lancer

    Turn your python code into a hideous mess. Ever heard of Black? This is the opposite.

  • unimport

    :rocket: The ultimate linter and formatter for removing unused import statements in your code. (by hakancelikdev)

    Project mention: Unused Import Linter: A Tool for Optimizing Your Code | | 2023-01-17
  • ufmt

    Safe, atomic formatting with black and µsort

  • lambdex

    Write complicated anonymous functions beyond lambdas in Python.

    Project mention: Adding C-style for loops to Python for fun | | 2023-02-03

    I've attempted something more crazy -- to make Python support multi-line lambda expression [1].

    It's done with AST manipulation as well, but on a larger scale and completer functionalities.


  • pre-commit-hook-yamlfmt

    YAML formatter for

    Project mention: Python package to format yaml file | | 2022-10-26

    You could use a pre commit hook for yamlfmt -

  • astypes

    Python library to infer types for AST nodes. Make the most powerful Python linters and formatters!

    Project mention: astypes: Python library to infer types for AST nodes. Make the most powerful Python linters and formatters! | | 2022-12-12
  • jsonfmt

    A CLI tool for pretty printing or compressing JSON objects.

    Project mention: A small tool for JSON | | 2023-05-28

    But it is precisely because of the previous ignorance that makes some differences between jsonfmt and jq.

  • insta-data-styled

    A program to format your Instagram's "messages.json" into a beautiful and readable web format.

  • eng

    Translate British English into American English in text files and Python code

    Project mention: eng: Translate British English into American English in text files and Python code | | 2022-09-28
  • thrift-fmt

    thrift formatter tool in python, keep and align comment, patch required and list sep

    Project mention: Show HN: A Formatter for Thrift Files | | 2022-06-02
  • InfluxDB

    Access the most powerful time series database as a service. Ingest, store, & analyze all types of time series data in a fully-managed, purpose-built database. Keep data forever with low-cost storage and superior data compression.

NOTE: The open source projects on this list are ordered by number of github stars. The number of mentions indicates repo mentiontions in the last 12 Months or since we started tracking (Dec 2020). The latest post mention was on 2023-05-28.

Python Formatter related posts


What are some of the best open-source Formatter projects in Python? This list will help you:

Project Stars
1 black 32,443
2 yapf 13,240
3 isort 5,813
4 autopep8 4,356
5 autoflake 766
6 best-of-python-dev 724
7 docformatter 407
8 blue 320
9 lancer 241
10 unimport 197
11 ufmt 79
12 lambdex 73
13 pre-commit-hook-yamlfmt 39
14 astypes 6
15 jsonfmt 5
16 insta-data-styled 4
17 eng 3
18 thrift-fmt 2
TestGPT | Generating meaningful tests for busy devs
Get non-trivial tests (and trivial, too!) suggested right inside your IDE, so you can code smart, create more value, and stay confident when you push.