EditorConfig


NameEditorConfig JSON
Version 0.12.4 PyPI version JSON
download
home_pagehttps://editorconfig.org/
SummaryEditorConfig File Locator and Interpreter for Python
upload_time2024-02-12 08:33:06
maintainer
docs_urlNone
authorEditorConfig Team
requires_python
licensePSF-2.0
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI
coveralls test coverage No coveralls.
            ========================
EditorConfig Python Core
========================
.. image:: https://img.shields.io/pypi/v/EditorConfig.svg
    :target: https://pypi.python.org/pypi/EditorConfig

.. image:: https://img.shields.io/pypi/wheel/EditorConfig.svg
    :target: https://pypi.python.org/pypi/EditorConfig

.. image:: https://img.shields.io/pypi/pyversions/EditorConfig.svg
    :target: https://pypi.python.org/pypi/EditorConfig

.. image:: https://secure.travis-ci.org/editorconfig/editorconfig-core-py.svg?branch=master
   :target: http://travis-ci.org/editorconfig/editorconfig-core-py

EditorConfig Python Core provides the same functionality as the
`EditorConfig C Core <https://github.com/editorconfig/editorconfig-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 <http://editorconfig.org>`_.

Installation
============

With setuptools::

    sudo python setup.py install

Getting Help
============
For help with the EditorConfig core code, please write to our `mailing list
<http://groups.google.com/group/editorconfig>`_.  Bugs and feature requests
should be submitted to our `issue tracker
<https://github.com/editorconfig/editorconfig/issues>`_.

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:

.. code-block:: python

    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
<http://pydocs.editorconfig.org>`_.

Running Test Cases
==================

`Cmake <http://www.cmake.org>`_ 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.

            

Raw data

            {
    "_id": null,
    "home_page": "https://editorconfig.org/",
    "name": "EditorConfig",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "",
    "author": "EditorConfig Team",
    "author_email": "",
    "download_url": "https://files.pythonhosted.org/packages/3d/85/7b5c2fac7fdc37d959fab714b13b9acb75884490dcc0e8b1dc5e64105084/EditorConfig-0.12.4.tar.gz",
    "platform": null,
    "description": "========================\nEditorConfig Python Core\n========================\n.. image:: https://img.shields.io/pypi/v/EditorConfig.svg\n    :target: https://pypi.python.org/pypi/EditorConfig\n\n.. image:: https://img.shields.io/pypi/wheel/EditorConfig.svg\n    :target: https://pypi.python.org/pypi/EditorConfig\n\n.. image:: https://img.shields.io/pypi/pyversions/EditorConfig.svg\n    :target: https://pypi.python.org/pypi/EditorConfig\n\n.. image:: https://secure.travis-ci.org/editorconfig/editorconfig-core-py.svg?branch=master\n   :target: http://travis-ci.org/editorconfig/editorconfig-core-py\n\nEditorConfig Python Core provides the same functionality as the\n`EditorConfig C Core <https://github.com/editorconfig/editorconfig-core>`_.\nEditorConfig Python core can be used as a command line program or as an\nimportable library.\n\nEditorConfig Project\n====================\n\nEditorConfig makes it easy to maintain the correct coding style when switching\nbetween different text editors and between different projects.  The\nEditorConfig project maintains a file format and plugins for various text\neditors which allow this file format to be read and used by those editors.  For\ninformation on the file format and supported text editors, see the\n`EditorConfig website <http://editorconfig.org>`_.\n\nInstallation\n============\n\nWith setuptools::\n\n    sudo python setup.py install\n\nGetting Help\n============\nFor help with the EditorConfig core code, please write to our `mailing list\n<http://groups.google.com/group/editorconfig>`_.  Bugs and feature requests\nshould be submitted to our `issue tracker\n<https://github.com/editorconfig/editorconfig/issues>`_.\n\nIf you are writing a plugin a language that can import Python libraries, you\nmay want to import and use the EditorConfig Python Core directly.\n\nUsing as a Library\n==================\n\nBasic example use of EditorConfig Python Core as a library:\n\n.. code-block:: python\n\n    from editorconfig import get_properties, EditorConfigError\n\n    filename = \"/home/zoidberg/humans/anatomy.md\"\n\n    try:\n        options = get_properties(filename)\n    except EditorConfigError:\n        print(\"Error occurred while getting EditorConfig properties\")\n    else:\n        for key, value in options.items():\n            print(f\"{key}={value}\")\n\nFor details, please take a look at the `online documentation\n<http://pydocs.editorconfig.org>`_.\n\nRunning Test Cases\n==================\n\n`Cmake <http://www.cmake.org>`_ has to be installed first. Run the test cases\nusing the following commands::\n\n    export PYTHONPATH=$(pwd)\n    cmake .\n    ctest .\n\nUse ``-DPYTHON_EXECUTABLE`` to run the tests using an alternative versions of\nPython (e.g. Python 3.12)::\n\n    cmake -DPYTHON_EXECUTABLE=/usr/bin/python3.12 .\n    ctest .\n\nLicense\n=======\n\nSee COPYING file for licensing details.\n",
    "bugtrack_url": null,
    "license": "PSF-2.0",
    "summary": "EditorConfig File Locator and Interpreter for Python",
    "version": "0.12.4",
    "project_urls": {
        "Bug Tracker": "https://github.com/editorconfig/editorconfig-core-py/issues",
        "Homepage": "https://editorconfig.org/",
        "Source Code": "https://github.com/editorconfig/editorconfig-core-py"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "3d857b5c2fac7fdc37d959fab714b13b9acb75884490dcc0e8b1dc5e64105084",
                "md5": "d550d32f745591a7f89f8ea59bdb91f8",
                "sha256": "24857fa1793917dd9ccf0c7810a07e05404ce9b823521c7dce22a4fb5d125f80"
            },
            "downloads": -1,
            "filename": "EditorConfig-0.12.4.tar.gz",
            "has_sig": false,
            "md5_digest": "d550d32f745591a7f89f8ea59bdb91f8",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 13278,
            "upload_time": "2024-02-12T08:33:06",
            "upload_time_iso_8601": "2024-02-12T08:33:06.745757Z",
            "url": "https://files.pythonhosted.org/packages/3d/85/7b5c2fac7fdc37d959fab714b13b9acb75884490dcc0e8b1dc5e64105084/EditorConfig-0.12.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-02-12 08:33:06",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "editorconfig",
    "github_project": "editorconfig-core-py",
    "travis_ci": true,
    "coveralls": false,
    "github_actions": false,
    "lcname": "editorconfig"
}
        
Elapsed time: 0.21341s