{"id":18488609,"url":"https://github.com/mstoeckl/python-fast-autoformat","last_synced_at":"2025-08-11T17:12:40.323Z","repository":{"id":57452068,"uuid":"97997427","full_name":"mstoeckl/python-fast-autoformat","owner":"mstoeckl","description":"PFA. Fast, consistent, pretty. You can't have them all.","archived":false,"fork":false,"pushed_at":"2018-09-28T23:45:35.000Z","size":30,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-20T00:57:14.470Z","etag":null,"topics":["autoformat","formatter","pfa","python","python3"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/pfa/","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mstoeckl.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-07-22T01:00:10.000Z","updated_at":"2022-03-18T02:44:22.000Z","dependencies_parsed_at":"2022-09-26T17:31:13.600Z","dependency_job_id":null,"html_url":"https://github.com/mstoeckl/python-fast-autoformat","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/mstoeckl/python-fast-autoformat","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mstoeckl%2Fpython-fast-autoformat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mstoeckl%2Fpython-fast-autoformat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mstoeckl%2Fpython-fast-autoformat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mstoeckl%2Fpython-fast-autoformat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mstoeckl","download_url":"https://codeload.github.com/mstoeckl/python-fast-autoformat/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mstoeckl%2Fpython-fast-autoformat/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269923325,"owners_count":24497092,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-11T02:00:10.019Z","response_time":75,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["autoformat","formatter","pfa","python","python3"],"created_at":"2024-11-06T12:52:10.813Z","updated_at":"2025-08-11T17:12:40.282Z","avatar_url":"https://github.com/mstoeckl.png","language":"C","readme":"# PFA (Python Fast Autoformat)\n\nAn autoformatter should be three things:\n\n* **Fast**: Run quickly so that you can afford to run the autoformatter on a large code base without ever having to wait for the autoformat to complete.\n* **Consistent**: Running the autoformatter a second time won't change the output. Code will run the same before and after the autoformatter is run. Trivial whitespace changes will be reverted.\n* **Pretty**: Output looks nice and preferably follows PEP8. \n\nPFA chooses to be *Fast* and *Consistent*, but sacrifices *Pretty* output in favor of speed.\n\n## Installation and Usage\n\nTo create the executable file `pfa`, run\n\n    make\n\nAfterwards you can copy it into `PATH`, say to `/usr/bin` or `~/bin/`.\n\nThere are two ways to run the program. If the executable file name does not end in \"i\", i.e. with\n\n    pfa that_python_script.py\n\nthen the formatted file will be dumped to standard output. If you make a symlink from `pfa` to `pfai` and run the latter like\n\n    pfai that_python_script.py scriptus_secundus.py\n    \nthen all files listed as arguments will be formatted in place.\n\n## FAQ\n\n* **Why is PFA written in C?** The startup time for the Python interpreter is often longer than it takes to run `pfa` on a 2000 line file.\n\n* **How fast is it?** The other popular Python formatters are `yapf` and `autopep8`. Formatting about 120KB of python code in place for the second time in a row with the following commands,\n\n        yapf -i bx.py\n        autopep8 -i bx.py\n        pfai bx.py\n\n    one finds that `yapf` takes 14.0 seconds; `autopep8` takes 1.8 seconds; and `pfai` completes in 0.020 seconds, less than the time it takes to press Enter.\n\n* **I have a change to contribute. Will it be accepted?**: Yes, as long as `pfa` still runs in O(n) for even pathological input.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmstoeckl%2Fpython-fast-autoformat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmstoeckl%2Fpython-fast-autoformat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmstoeckl%2Fpython-fast-autoformat/lists"}