EditorConfig
EditorConfig File Locator and Interpreter for Python
What it is and what it does
EditorConfig Python Core reads .editorconfig files and returns the style properties that apply to a given file path. It mirrors the functionality of the EditorConfig C Core, making it useful for tools and editors that need to enforce consistent coding conventions across teams and projects without requiring manual configuration in each editor.
The package works as both a standalone command-line utility and as an importable Python library. It has no runtime dependencies and supports modern Python versions (3.9 through 3.13), making it straightforward to integrate into build systems, linters, formatters, or editor plugins that need to respect EditorConfig conventions.
Use it for:
- Integrate EditorConfig support into a Python-based linter or code formatter to automatically apply project style rules.
- Build an editor plugin or IDE extension that reads .editorconfig files to configure indentation, line endings, and charset.
- Validate that a codebase's actual formatting matches the rules defined in its .editorconfig file as part of CI/CD.
- Create a development tool that queries EditorConfig properties for a file to guide code generation or refactoring.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Parses and applies EditorConfig files to determine coding style properties for a given file path, usable as a command-line tool or importable library.
Yes. This is a well-maintained, dependency-free library that solves a real problem: reading EditorConfig files in Python. It's actively developed, supports current Python versions, carries no security vulnerabilities, and uses a permissive license. Install it if you're building tools that need to respect EditorConfig conventions.
Install
editorconfig on PyPI
pip
pip install editorconfiguv
uv add editorconfigpoetry
poetry add editorconfigInstalling EditorConfig
Before you install
Low friction: pure Python wheel with no runtime dependencies. Actively maintained with a recent commit on 2026-08-01 and support for current Python versions (3.9–3.13, including PyPy).
License in practice
Licensed under PSF-2.0 (permissive), allowing free use, modification, and distribution with minimal restrictions—suitable for both open-source and proprietary projects.
Quickstart
pip install editorconfig
from editorconfig import get_properties, EditorConfigError
filename = "/path/to/file.py"
try:
options = get_properties(filename)
for key, value in options.items():
print(f"{key}={value}")
except EditorConfigError:
print("Error reading EditorConfig properties")
Verify before relying
- Whether the library handles all EditorConfig file format edge cases identically to the C Core reference implementation.
- Performance characteristics when processing deeply nested directory structures or large numbers of files.
Package facts
| License | PSF-2.0 (permissive) |
| Python support | supports the current Python release (>=3.9) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | actively maintained — 431 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 6,093,752/month — #1,972 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: editorconfig-0.17.1-py3-none-any.whl
Tags
More Software Development packages
Provides backported and experimental type hints…
permissive · top 100 on PyPI
numpyNumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
distlibDistlib provides low-level packaging utilities…
permissive · top 1,000 on PyPI
cmakelintcmakelint parses CMake files and reports style…
permissive · top 15,000 on PyPI
python-editorProgrammatically open your system's $EDITOR…
permissive · top 5,000 on PyPI
beautyshBeautysh automatically formats and beautifies…
permissive · top 15,000 on PyPI
cmake-formatFormats, lints, and annotates CMake listfiles,…
copyleft · top 15,000 on PyPI
cmakeDistributes CMake 4.4.2 as a Python package,…
permissive · top 5,000 on PyPI
cmakelangProvides command-line tools to format, lint,…
copyleft · top 5,000 on PyPI
oslo.configParses command-line arguments and .ini-style…
permissive · top 5,000 on PyPI
INIToolsINITools parses and manipulates INI-style…
permissive · top 15,000 on PyPI
editorOpens your system's default text editor (or a…
permissive · top 5,000 on PyPI
scikit-build-coreA build backend that uses CMake to compile…
permissive · top 5,000 on PyPI