Skip to main content

EditorConfig Python Core

https://img.shields.io/pypi/v/EditorConfig.svg https://img.shields.io/pypi/wheel/EditorConfig.svg https://img.shields.io/pypi/pyversions/EditorConfig.svg https://secure.travis-ci.org/editorconfig/editorconfig-core-py.svg?branch=master

EditorConfig Python Core provides the same functionality as the EditorConfig C Core. EditorConfig Python core can be used as a command line program or as an importable library.

EditorConfig Project

EditorConfig makes it easy to maintain the correct coding style when switching between different text editors and between different projects. The EditorConfig project maintains a file format and plugins for various text editors which allow this file format to be read and used by those editors. For information on the file format and supported text editors, see the EditorConfig website.

Installation

With setuptools:

sudo python setup.py install

Getting Help

For help with the EditorConfig core code, please write to our mailing list. Bugs and feature requests should be submitted to our issue tracker.

If you are writing a plugin a language that can import Python libraries, you may want to import and use the EditorConfig Python Core directly.

Using as a Library

Basic example use of EditorConfig Python Core as a library:

from editorconfig import get_properties, EditorConfigError

filename = "/home/zoidberg/humans/anatomy.md"

try:
    options = get_properties(filename)
except EditorConfigError:
    print("Error occurred while getting EditorConfig properties")
else:
    for key, value in options.items():
        print(f"{key}={value}")

For details, please take a look at the online documentation.

Running Test Cases

Cmake has to be installed first. Run the test cases using the following commands:

export PYTHONPATH=$(pwd)
cmake .
ctest .

Use -DPYTHON_EXECUTABLE to run the tests using an alternative versions of Python (e.g. Python 3.12):

cmake -DPYTHON_EXECUTABLE=/usr/bin/python3.12 .
ctest .

License

See COPYING file for licensing details.

Metadata

Release files for EditorConfig 0.17.0

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

Source distribution (sdist)

Source distribution for EditorConfig 0.17.0
File Size Uploaded Provenance Actions
editorconfig-0.17.0.tar.gz 13.4 kB Without provenance Details for editorconfig-0.17.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for EditorConfig 0.17.0
File Interpreter ABI Platform Actions
EditorConfig-0.17.0-py3-none-any.whl Python 3 none any Details for EditorConfig-0.17.0-py3-none-any.whl

Total release size: 29.6 kB

Release files / editorconfig-0.17.0.tar.gz

Download URL editorconfig-0.17.0.tar.gz
Size 13.4 kB
Tags Source
SHA-256 checksum
How to use checksums
8739052279699840065d3a9f5c125d7d5a98daeefe53b0e5274261d77cb49aa2
BLAKE2b-256 checksum
How to use checksums
b429785595a0d8b30ab8d2486559cfba1d46487b8dcbd99f74960b6b4cca92a4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.12.8

Release files / EditorConfig-0.17.0-py3-none-any.whl

Download URL EditorConfig-0.17.0-py3-none-any.whl
Size 16.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fe491719c5f65959ec00b167d07740e7ffec9a3f362038c72b289330b9991dfc
BLAKE2b-256 checksum
How to use checksums
afe58dba39ea24ca3de0e954e668107692f4dfc13a85300a531fa9a39e83fde4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.12.8

Security for EditorConfig 0.17.0

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.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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