Metadata-Version: 2.1
Name: pyconfs
Version: 0.5.5
Summary: PyConfs, unified handling of configuration files for Python
Home-page: https://github.com/gahjelle/pyconfs
Keywords: configuration ini json toml yml
Author: Geir Arne Hjelle
Author-email: geirarne@gmail.com
Requires-Python: >=3.6
Description-Content-Type: text/markdown
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Natural Language :: English
Classifier: Operating System :: MacOS
Classifier: Operating System :: Microsoft
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Dist: importlib_resources; python_version < '3.7'
Requires-Dist: pyplugs
Requires-Dist: black ; extra == "dev"
Requires-Dist: bumpversion ; extra == "dev"
Requires-Dist: flake8 ; extra == "dev"
Requires-Dist: flit ; extra == "dev"
Requires-Dist: interrogate ; extra == "dev"
Requires-Dist: isort ; extra == "dev"
Requires-Dist: mypy ; extra == "dev"
Requires-Dist: pre-commit ; extra == "dev"
Requires-Dist: mkdocs ; extra == "doc"
Requires-Dist: black ; extra == "test"
Requires-Dist: flake8 ; extra == "test"
Requires-Dist: interrogate ; extra == "test"
Requires-Dist: isort ; extra == "test"
Requires-Dist: mypy ; extra == "test"
Requires-Dist: pytest ; extra == "test"
Requires-Dist: pytest-cov ; extra == "test"
Requires-Dist: tox ; extra == "test"
Requires-Dist: toml ; extra == "toml"
Requires-Dist: PyYAML ; extra == "yaml"
Provides-Extra: dev
Provides-Extra: doc
Provides-Extra: test
Provides-Extra: toml
Provides-Extra: yaml

# PyConfs

_Unified handling of configuration files in Python_

[![Latest version](https://img.shields.io/pypi/v/pyconfs.svg)](https://pypi.org/project/pyconfs/)
[![Python versions](https://img.shields.io/pypi/pyversions/pyconfs.svg)](https://pypi.org/project/pyconfs/)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
[![Interrogate DocStrings](https://github.com/gahjelle/pyconfs/blob/main/docs/images/interrogate_badge.svg)](https://interrogate.readthedocs.io/)
[![unit_tests](https://github.com/gahjelle/pyconfs/workflows/unit_tests/badge.svg)](https://github.com/gahjelle/pyconfs/actions)

## Installing PyConfs

PyConfs is available at [PyPI](https://pypi.org/project/pyconfs/). You can install it using Pip:

    $ python -m pip install pyconfs


## Using PyConfs

A **PyConfs Configuration** is a dictionary-like object that unifies several different configuration file formats, including INI, JSON, TOML, and YAML.

**Read a configuration from file**:

    from pyconfs import Configuration
    cfg = Configuration.from_file("sample.json")

**Access entries in a configuration**:

    package_name = cfg.name
    first_name = cfg.author.firstname


## Installing From Source

You can always download the [latest version of PyConfs from GitHub](https://github.com/gahjelle/pyconfs). PyConfs uses [Flit](https://flit.readthedocs.io/) as a setup tool.

To install PyConfs from the downloaded source, run Flit:

    $ python -m flit install --deps production

If you want to change and play with the PyConfs source code, you should install it in editable mode:

    $ python -m flit install --symlink
