Python Formatter

Open-source Python projects categorized as Formatter

Top 21 Python Formatter Projects

  • black

    The uncompromising Python code formatter

  • Project mention: How to setup Black and pre-commit in python for auto text-formatting on commit | dev.to | 2024-03-29

    $ git commit -m "add pre-commit configuration" [INFO] Initializing environment for https://github.com/psf/black. [INFO] Installing environment for https://github.com/psf/black. [INFO] Once installed this environment will be reused. [INFO] This may take a few minutes... black................................................(no files to check)Skipped [main 6e21eab] add pre-commit configuration 1 file changed, 7 insertions(+)

  • yapf

    A formatter for Python files

  • Project mention: Enhance Your Project Quality with These Top Python Libraries | dev.to | 2024-03-18

    YAPF (Yet Another Python Formatter): YAPF takes a different approach in that it’s based off of ‘clang-format’, a popular formatter for C++ code. YAPF reformats Python code so that it conforms to the style guide and looks good.

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • isort

    A Python utility / library to sort imports.

  • Project mention: Enhance Your Project Quality with These Top Python Libraries | dev.to | 2024-03-18

    isort: This library sorts your imports alphabetically, and automatically separates them into sections and by type. It provides a cleaner and more organised way to manage project imports.

  • autopep8

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

  • Project mention: Enhance Your Project Quality with These Top Python Libraries | dev.to | 2024-03-18

    AutoPEP8: This tool automatically formats Python code to conform to the PEP 8 style guide. It uses pycodestyle, a library that encapsulates the functionality of the original pep8 tool.

  • best-of-python-dev

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

  • autoflake

    Removes unused imports and unused variables as reported by pyflakes

  • Project mention: Embracing Modern Python for Web Development | dev.to | 2023-12-08

    Ruff is not only much faster, but it is also very convenient to have an all-in-one solution that replaces multiple other widely used tools: Flake8 (linter), isort (imports sorting), Black (code formatter), autoflake, many Flake8 plugins and more. And it has drop-in parity with these tools, so it is really straightforward to migrate from them to Ruff.

  • docformatter

    Formats docstrings to follow PEP 257

  • SaaSHub

    SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives

    SaaSHub logo
  • blue

    The slightly less uncompromising Python code formatter.

  • mdformat

    CommonMark compliant Markdown formatter

  • Project mention: Formatting on save not working | /r/HelixEditor | 2023-07-05

    [[language]] name = "python" roots = ["pyproject.toml"] formatter = { command = "black", args = ["--quiet", "-"] } language-server = { command = "pyright-langserver", args = ["--stdio"] } config = {} auto-format = true [[language]] name = "rust" auto-format = true # [[language]] # name = "typescript" # auto-format = true # formatter = { command = "prettier", args = ["--parser", "typescript"]} # # pass format options according to https://github.com/typescript-language-server/typescript-language-server#workspacedidchangeconfiguration omitting the "[language].format." prefix. # config = { format = { "semicolons" = "insert", "insertSpaceBeforeFunctionParenthesis" = true } } [[language]] name = "tsx" formatter = { command = 'prettier', args = ["--parser", "typescript"] } auto-format = true [[language]] name = "javascript" auto-format = true formatter = { command = 'npx', args = ["prettier", "--config", ".prettierrc", "--parser", "javascript"] } # formatter = { command = "prettier", args = ["--parser", "javascript"]} [[language]] name = "css" formatter = { command = 'prettier', args = ["--parser", "css"] } [[language]] name = "markdown" # https://github.com/executablebooks/mdformat formatter = { command = "mdformat", args = ["-"] } [[language]] name = "json" formatter = { command = "prettier", args = ["--parser", "json"] } [[language]] name = "toml" auto-format = true # https://github.com/bd82/toml-tools/tree/master/packages/prettier-plugin-toml formatter = { command = "prettier", args = ["--parser", "toml"] } [[language]] name = "yaml" indent = { tab-width = 2, unit = " " } formatter = { command = "prettier", args = ["--parser", "yaml"] } [[language]] name = "astro" scope = "source.astro" injection-regex = "astro" file-types = ["astro"] roots = ["package.json", "astro.config.mjs"] language-server = { command = "astro-ls", args = ["--stdio"] } config = { "typescript" = { serverPath = "/Users/matteostara/.nvm/versions/node/v18.16.0/bin/typescript-language-server" }, "environment" = "node" }

  • 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)

  • ufmt

    Safe, atomic formatting with black and µsort

  • lambdex

    Write complicated anonymous functions beyond lambdas in Python.

  • pre-commit-hook-yamlfmt

    YAML formatter for http://pre-commit.com

  • beancount-black

    Opinionated code formatter, just like Python's black code formatter but for Beancount

  • Project mention: Custom Beancount form web app for inputting similar entries easily plus utils cli tool | /r/plaintextaccounting | 2023-10-24

    The cli tool also comes with the beancount-black formatter as a subcommand. Hope you find it useful.

  • promformat

    PromQL formatter

  • jsonfmt

    A CLI tool for pretty printing, querying and format conversion JSON documents.

  • Project mention: A small tool for JSON | /r/Python | 2023-05-28

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

  • eng

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

  • astypes

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

  • insta-data-styled

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

  • thrift-fmt

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

  • SaaSHub

    SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives

    SaaSHub logo
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).

Python Formatter related posts

  • Let's meet Black: Python Code Formatting

    2 projects | dev.to | 7 Feb 2024
  • Command Line Interface Guidelines

    8 projects | news.ycombinator.com | 6 Feb 2024
  • Embracing Modern Python for Web Development

    12 projects | dev.to | 8 Dec 2023
  • Auto-formater for Android (Kotlin)

    1 project | /r/androiddev | 5 Dec 2023
  • Lute v3 - installed software for learning foreign languages through reading

    2 projects | /r/flask | 15 Nov 2023
  • A Tale of Two Kitchens - Hypermodernizing Your Python Code Base

    31 projects | dev.to | 12 Nov 2023
  • Python rewrites values in all nested dictionaries, rather than iterating through them uniquely?

    1 project | /r/learnpython | 6 Jul 2023
  • A note from our sponsor - InfluxDB
    www.influxdata.com | 27 May 2024
    Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality. Learn more →

Index

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

Project Stars
1 black 37,555
2 yapf 13,657
3 isort 6,329
4 autopep8 4,531
5 best-of-python-dev 929
6 autoflake 866
7 docformatter 515
8 blue 383
9 mdformat 358
10 lancer 253
11 unimport 238
12 ufmt 92
13 lambdex 79
14 pre-commit-hook-yamlfmt 55
15 beancount-black 36
16 promformat 31
17 jsonfmt 11
18 eng 7
19 astypes 6
20 insta-data-styled 4
21 thrift-fmt 2

Sponsored
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com