Skip to main content

A better way to handle .editorconfig files with Python.

Project description

pyeditorconfig

Note The logic in this module was created by @Akuli due to the lack of maintanence of the normal editorconfig module. I simply added it to PyPI and made a few changes to the code. All credit goes to @Akuli.

Description

This module is a simple implementation of the EditorConfig file format. It is designed to be simple and easy to use. You use the get_config() method with a path as an argument and a dict with the configuration will be returned.

Installation

pip install pyeditorconfig

Documentation

get_config(path)

This method takes an absolute path as an argument and returns a dict with the configuration. If there is no configuration file, it will return an empty dict.

Argument Type Description
path os.path.abspath or str The absolute path to the file. The str must also be the absolute path or it will not work.

Example:

from os import path

from pyeditorconfig import get_config

print(get_config(__file__))

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyeditorconfig-1.0.0.tar.gz (6.4 kB view hashes)

Uploaded Source

Built Distribution

pyeditorconfig-1.0.0-py3-none-any.whl (6.6 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page