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.

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS 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

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

  • astypes

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

  • eng

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

  • 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

Index

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

Project Stars
1 black 37,376
2 yapf 13,651
3 isort 6,314
4 autopep8 4,517
5 best-of-python-dev 907
6 autoflake 858
7 docformatter 504
8 blue 383
9 mdformat 349
10 lancer 251
11 unimport 238
12 ufmt 91
13 lambdex 79
14 pre-commit-hook-yamlfmt 55
15 beancount-black 34
16 promformat 31
17 jsonfmt 11
18 astypes 6
19 eng 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