🍺 BREW Explorer

← all formulae

autopep8

brew install autopep8 v2.3.2 MIT

Automatically formats Python code to conform to the PEP 8 style guide

39
30-day installs · #5191
134
90-day · #4946
801
365-day · #4192
4.7k
★ GitHub stars · updated 2mo ago

Runtime dependencies

GitHub topics

codeformatter formatter pep8 python

Links

Raw metadata
{
  "aliases": [],
  "alternatives": [],
  "build_dependencies": [],
  "categories": [],
  "caveats": null,
  "conflicts_with": [],
  "dependencies": [
    "python@3.14"
  ],
  "deprecated": 0,
  "deprecation_reason": null,
  "desc": "Automatically formats Python code to conform to the PEP 8 style guide",
  "disable_reason": null,
  "disabled": 0,
  "enrichment_fetched_at": "2026-06-20T23:35:39+00:00",
  "first_seen": "2026-06-20T23:34:18+00:00",
  "full_name": "autopep8",
  "github_default_branch": "main",
  "github_last_commit_at": "2026-06-11T07:59:49Z",
  "github_readme_excerpt": "========\nautopep8\n========\n\n.. image:: https://img.shields.io/pypi/v/autopep8.svg\n    :target: https://pypi.org/project/autopep8/\n    :alt: PyPI Version\n\n.. image:: https://github.com/hhatto/autopep8/workflows/Python%20package/badge.svg\n    :target: https://github.com/hhatto/autopep8/actions\n    :alt: Build status\n\n.. image:: https://codecov.io/gh/hhatto/autopep8/branch/main/graph/badge.svg\n    :target: https://codecov.io/gh/hhatto/autopep8\n    :alt: Code Coverage\n\nautopep8 automatically formats Python code to conform to the `PEP 8`_ style\nguide. It uses the pycodestyle_ utility to determine what parts of the code\nneeds to be formatted. autopep8 is capable of fixing most of the formatting\nissues_ that can be reported by pycodestyle.\n\n.. _PEP 8: https://www.python.org/dev/peps/pep-0008/\n.. _issues: https://pycodestyle.readthedocs.org/en/latest/intro.html#error-codes\n\n.. contents::\n\n\nInstallation\n============\n\nFrom pip::\n\n    $ pip install --upgrade autopep8\n\nConsider using the ``--user`` option_.\n\n.. _option: https://pip.pypa.io/en/latest/user_guide/#user-installs\n\n\nRequirements\n============\n\nautopep8 requires pycodestyle_.\n\n.. _pycodestyle: https://github.com/PyCQA/pycodestyle\n\n\nUsage\n=====\n\nTo modify a file in place (with aggressive level 2)::\n\n    $ autopep8 --in-place --aggressive --aggressive \u003cfilename\u003e\n\nBefore running autopep8.\n\n.. code-block:: python\n\n    import math, sys;\n\n    def example1():\n        ####This is a long comment. This should be wrapped to fit within 72 characters.\n        some_tuple=(   1,2, 3,\u0027a\u0027  );\n        some_variable={\u0027long\u0027:\u0027Long code lines should be wrapped within 79 characters.\u0027,\n        \u0027other\u0027:[math.pi, 100,200,300,9876543210,\u0027This is a long string that goes on\u0027],\n        \u0027more\u0027:{\u0027inner\u0027:\u0027This whole logical line should be wrapped.\u0027,some_tuple:[1,\n        20,300,40000,500000000,60000000000000000]}}\n        return (some_tuple, some_variable)\n    def example2(): return {\u0027has_key() is deprecated\u0027:True}.has_key({\u0027f\u0027:2}.has_key(\u0027\u0027));\n    c",
  "github_repo": "hhatto/autopep8",
  "github_stars": 4667,
  "github_topics": [
    "codeformatter",
    "formatter",
    "pep8",
    "python"
  ],
  "homepage": "https://github.com/hhatto/autopep8",
  "homepage_og_description": null,
  "homepage_og_image": null,
  "homepage_title": null,
  "installs_30d": 39,
  "installs_365d": 801,
  "installs_90d": 134,
  "keg_only": 0,
  "keg_only_reason": null,
  "last_seen": "2026-06-20T23:34:18+00:00",
  "license": "MIT",
  "llm_generated_at": null,
  "llm_model": null,
  "name": "autopep8",
  "oldnames": [],
  "one_liner": null,
  "optional_dependencies": [],
  "rank_30d": 5191,
  "rank_365d": 4192,
  "rank_90d": 4946,
  "raw_hash": "05fbabd1431f052c",
  "recommended_dependencies": [],
  "revision": 0,
  "ruby_source_path": "Formula/a/autopep8.rb",
  "tap": "homebrew/core",
  "test_dependencies": [],
  "uses_from_macos": [],
  "version_head": null,
  "version_stable": "2.3.2",
  "versioned_formulae": [],
  "why_use_this": null
}