confuse


Nameconfuse JSON
Version 2.0.1 PyPI version JSON
download
home_pagehttps://github.com/beetbox/confuse
SummaryPainless YAML configuration.
upload_time2023-04-01 23:26:58
maintainerNone
docs_urlNone
authorAdrian Sampson
requires_python>=3.6
licenseNone
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage
            Confuse: painless YAML config files
===================================

.. image:: https://github.com/beetbox/confuse/workflows/Build/badge.svg?branch=master
    :target: https://github.com/beetbox/confuse/actions

.. image:: http://img.shields.io/pypi/v/confuse.svg
    :target: https://pypi.python.org/pypi/confuse

**Confuse** is a configuration library for Python that uses `YAML`_. It takes
care of defaults, overrides, type checking, command-line integration,
environment variable support, human-readable errors, and standard OS-specific
locations.

What It Does
------------

Here’s what Confuse brings to the table:

-  An **utterly sensible API** resembling dictionary-and-list structures
   but providing **transparent validation** without lots of boilerplate
   code. Type ``config['num_goats'].get(int)`` to get the configured
   number of goats and ensure that it’s an integer.

-  Combine configuration data from **multiple sources**. Using
   *layering*, Confuse allows user-specific configuration to seamlessly
   override system-wide configuration, which in turn overrides built-in
   defaults. An in-package ``config_default.yaml`` can be used to
   provide bottom-layer defaults using the same syntax that users will
   see. A runtime overlay allows the program to programmatically
   override and add configuration values.

-  Look for configuration files in **platform-specific paths**. Like
   ``$XDG_CONFIG_HOME`` or ``~/.config`` on Unix; "Application Support" on
   macOS; ``%APPDATA%`` on Windows. Your program gets its own
   directory, which you can use to store additional data. You can
   transparently create this directory on demand if, for example, you
   need to initialize the configuration file on first run. And an
   environment variable can be used to override the directory's
   location.

-  Integration with **command-line arguments** via `argparse`_ or `optparse`_
   from the standard library. Use argparse's declarative API to allow
   command-line options to override configured defaults.

-  Include configuration values from **environment variables**. Values undergo
   automatic type conversion, and nested dicts and lists are supported.

Installation
------------

Confuse is available on `PyPI <https://pypi.org/project/confuse/>`_ and can be installed
using :code:`pip`:

.. code-block:: sh

    pip install confuse

Using Confuse
-------------

`Confuse's documentation`_ describes its API in detail.

Credits
-------

Confuse was made to power `beets`_.
Like beets, it is available under the `MIT license`_.

.. _ConfigParser: http://docs.python.org/library/configparser.html
.. _YAML: http://yaml.org/
.. _optparse: http://docs.python.org/dev/library/optparse.html
.. _argparse: http://docs.python.org/dev/library/argparse.html
.. _logging: http://docs.python.org/library/logging.html
.. _Confuse's documentation: http://confuse.readthedocs.org/en/latest/usage.html
.. _MIT license: http://www.opensource.org/licenses/mit-license.php
.. _beets: https://github.com/beetbox/beets

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/beetbox/confuse",
    "name": "confuse",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": null,
    "keywords": null,
    "author": "Adrian Sampson",
    "author_email": "adrian@radbox.org",
    "download_url": "https://files.pythonhosted.org/packages/a7/77/05e2284baff5f2106f74b528b9930caf764d6c400733eb42e617c4234a7d/confuse-2.0.1.tar.gz",
    "platform": null,
    "description": "Confuse: painless YAML config files\n===================================\n\n.. image:: https://github.com/beetbox/confuse/workflows/Build/badge.svg?branch=master\n    :target: https://github.com/beetbox/confuse/actions\n\n.. image:: http://img.shields.io/pypi/v/confuse.svg\n    :target: https://pypi.python.org/pypi/confuse\n\n**Confuse** is a configuration library for Python that uses `YAML`_. It takes\ncare of defaults, overrides, type checking, command-line integration,\nenvironment variable support, human-readable errors, and standard OS-specific\nlocations.\n\nWhat It Does\n------------\n\nHere\u2019s what Confuse brings to the table:\n\n-  An **utterly sensible API** resembling dictionary-and-list structures\n   but providing **transparent validation** without lots of boilerplate\n   code. Type ``config['num_goats'].get(int)`` to get the configured\n   number of goats and ensure that it\u2019s an integer.\n\n-  Combine configuration data from **multiple sources**. Using\n   *layering*, Confuse allows user-specific configuration to seamlessly\n   override system-wide configuration, which in turn overrides built-in\n   defaults. An in-package ``config_default.yaml`` can be used to\n   provide bottom-layer defaults using the same syntax that users will\n   see. A runtime overlay allows the program to programmatically\n   override and add configuration values.\n\n-  Look for configuration files in **platform-specific paths**. Like\n   ``$XDG_CONFIG_HOME`` or ``~/.config`` on Unix; \"Application Support\" on\n   macOS; ``%APPDATA%`` on Windows. Your program gets its own\n   directory, which you can use to store additional data. You can\n   transparently create this directory on demand if, for example, you\n   need to initialize the configuration file on first run. And an\n   environment variable can be used to override the directory's\n   location.\n\n-  Integration with **command-line arguments** via `argparse`_ or `optparse`_\n   from the standard library. Use argparse's declarative API to allow\n   command-line options to override configured defaults.\n\n-  Include configuration values from **environment variables**. Values undergo\n   automatic type conversion, and nested dicts and lists are supported.\n\nInstallation\n------------\n\nConfuse is available on `PyPI <https://pypi.org/project/confuse/>`_ and can be installed\nusing :code:`pip`:\n\n.. code-block:: sh\n\n    pip install confuse\n\nUsing Confuse\n-------------\n\n`Confuse's documentation`_ describes its API in detail.\n\nCredits\n-------\n\nConfuse was made to power `beets`_.\nLike beets, it is available under the `MIT license`_.\n\n.. _ConfigParser: http://docs.python.org/library/configparser.html\n.. _YAML: http://yaml.org/\n.. _optparse: http://docs.python.org/dev/library/optparse.html\n.. _argparse: http://docs.python.org/dev/library/argparse.html\n.. _logging: http://docs.python.org/library/logging.html\n.. _Confuse's documentation: http://confuse.readthedocs.org/en/latest/usage.html\n.. _MIT license: http://www.opensource.org/licenses/mit-license.php\n.. _beets: https://github.com/beetbox/beets\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Painless YAML configuration.",
    "version": "2.0.1",
    "split_keywords": [],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "321fcf496479814d41fc252004482deeb90b740b4a6a391a3355c0b11d7e0abf",
                "md5": "a86739f764dbfa6e37a09e8e9828dc50",
                "sha256": "9b9e5bbc70e2cb9b318bcab14d917ec88e21bf1b724365e3815eb16e37aabd2a"
            },
            "downloads": -1,
            "filename": "confuse-2.0.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "a86739f764dbfa6e37a09e8e9828dc50",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 24750,
            "upload_time": "2023-04-01T23:26:55",
            "upload_time_iso_8601": "2023-04-01T23:26:55.321017Z",
            "url": "https://files.pythonhosted.org/packages/32/1f/cf496479814d41fc252004482deeb90b740b4a6a391a3355c0b11d7e0abf/confuse-2.0.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "a77705e2284baff5f2106f74b528b9930caf764d6c400733eb42e617c4234a7d",
                "md5": "8aa2b5c90e884af2c8f4b65f3e8d574e",
                "sha256": "7379a2ad49aaa862b79600cc070260c1b7974d349f4fa5e01f9afa6c4dd0611f"
            },
            "downloads": -1,
            "filename": "confuse-2.0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "8aa2b5c90e884af2c8f4b65f3e8d574e",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 50872,
            "upload_time": "2023-04-01T23:26:58",
            "upload_time_iso_8601": "2023-04-01T23:26:58.031741Z",
            "url": "https://files.pythonhosted.org/packages/a7/77/05e2284baff5f2106f74b528b9930caf764d6c400733eb42e617c4234a7d/confuse-2.0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-04-01 23:26:58",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "beetbox",
    "github_project": "confuse",
    "travis_ci": false,
    "coveralls": true,
    "github_actions": true,
    "requirements": [],
    "tox": true,
    "lcname": "confuse"
}
        
Elapsed time: 0.09099s