Skip to main content

muthu-pyformatter

GitHub Repo GitHub License GitHub Forks GitHub Stars GitHub Contributors

Build Status PyPI Version Test PyPI Version

GitHub Image


A lightweight Python code-quality utility that checks PEP8 compliance using pycodestyle and auto-formats code using autopep8, enforcing a strict 120-character line limit.


✨ Features

  • ✔ Scans all Python files in any directory
  • ✔ Enforces max line length = 120
  • ✔ Automatically fixes code formatting using autopep8
  • ✔ Shows detailed style errors using pycodestyle
  • ✔ Supports custom --path argument (defaults to current directory)
  • ✔ Works on Windows, Linux, and macOS

📦 Installation

1️⃣ Install via PyPI (recommended)

pip install muthu-pyformatter

2️⃣ Clone the repository (optional / development)

git clone https://github.com/kumarmuthu/muthu-pyformatter
cd muthu-pyformatter

▶️ Usage

CLI via PyPI

Check and auto-format Python files in a directory:

muthu-pyformatter --path "C:\users\kumar\repo\"

or on Linux/macOS:

muthu-pyformatter --path ./src

Using Python module (Git clone / development)

python -m muthu_pyformatter.formatter --path "C:\users\kumar\repo\"

or on Linux/macOS:

python3 -m muthu_pyformatter.formatter --path ./src

🧰 What the Script Does

1️⃣ Installs required tools (if missing)

  • pycodestyle
  • autopep8
  • colorama

2️⃣ Runs pycodestyle

  • Detects PEP8 violations
  • Enforces 120-character limit
  • Prints all issues

3️⃣ Runs autopep8

  • Auto-formats Python files
  • Fixes spacing, indentation, blank lines
  • Recursively processes all .py files

4️⃣ Re-runs pycodestyle to validate fixes


📁 Script File Name

muthu_pyformatter/formatter.py

or via CLI after PyPI install:

muthu-pyformatter

📝 License

MIT License Feel free to use, modify, and contribute.


Metadata

Release files for muthu-pyformatter 0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for muthu-pyformatter 0.0.1
File Size Uploaded Provenance
muthu_pyformatter-0.0.1.tar.gz 4.8 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for muthu-pyformatter 0.0.1
File Interpreter ABI Platform
muthu_pyformatter-0.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 10.0 kB

Release files / muthu_pyformatter-0.0.1.tar.gz

Download URL muthu_pyformatter-0.0.1.tar.gz
Size 4.8 kB
Tags Source
SHA-256 checksum
How to use checksums
eba67c2fad4467d880ff816e98445c10c91337ac0fa737a2c415c7748f0cac96
BLAKE2b-256 checksum
How to use checksums
20ba92d50ddaead70ce56a7b020839126e07b06689355d7bd8a31ec0bfc718b7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.5

Release files / muthu_pyformatter-0.0.1-py3-none-any.whl

Download URL muthu_pyformatter-0.0.1-py3-none-any.whl
Size 5.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c5d780131a94a1cf1ddcb284261ef62ae64f1139ba9757d61e0d40ebd985f297
BLAKE2b-256 checksum
How to use checksums
2cf616158618b94a94f5f95c5dd19eb8369492fb0e229ed925da322ed19442ff
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.5

Security for muthu-pyformatter 0.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page