skillfed

EditorConfig

EditorConfig File Locator and Interpreter for Python

editorconfig v0.17.1 6.1M downloads/30d#1,972 on PyPI103
Permissive license PSF-2.0 Active released

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 editorconfig

uv

uv add editorconfig

poetry

poetry add editorconfig

Installing 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

License :: OSI Approved :: Python Software Foundation LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.9Programming Language :: Python :: Implementation :: PyPy

Tags

editorconfig parser pythoncoding style configurationeditor config file readercross-editor style settingseditorconfig core libraryfile properties from editorconfigmaintain coding standards
code-styleeditor-configcross-editor

More Software Development packages